fix: arguments

This commit is contained in:
Shivam Mishra
2025-07-15 20:21:22 +05:30
parent c0d1efa0ad
commit 394ba4ff73
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -2,11 +2,11 @@ module Agentable
extend ActiveSupport::Concern
included do
def agent(user)
def agent
Agents::Agent.new(
name: agent_name,
instructions: ->(context) { agent_instructions(context) },
tools: agent_tools(user),
tools: agent_tools,
model: agent_model
)
end
@@ -109,8 +109,8 @@ class Captain::Assistant::AgentRunnerService
end
def build_and_wire_agents
assistant_agent = @assistant.agent(nil)
scenario_agents = @assistant.scenarios.enabled.map { |scenario| scenario.agent(nil) }
assistant_agent = @assistant.agent
scenario_agents = @assistant.scenarios.enabled.map { |scenario| scenario.agent }
assistant_agent.register_handoffs(*scenario_agents) if scenario_agents.any?
scenario_agents.each { |scenario_agent| scenario_agent.register_handoffs(assistant_agent) }