mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 08:38:30 +00:00
refactoring default agent tools
This commit is contained in:
@@ -20,14 +20,14 @@ class AgentTools(BaseModel):
|
||||
func=self.delegate_work,
|
||||
name="Delegate work to co-worker",
|
||||
description=self.i18n.tools("delegate_work").format(
|
||||
coworkers=", ".join([agent.role for agent in self.agents])
|
||||
coworkers="\n".join([f"- {agent.role}" for agent in self.agents])
|
||||
),
|
||||
),
|
||||
StructuredTool.from_function(
|
||||
func=self.ask_question,
|
||||
name="Ask question to co-worker",
|
||||
description=self.i18n.tools("ask_question").format(
|
||||
coworkers=", ".join([agent.role for agent in self.agents])
|
||||
coworkers="\n".join([f"- {agent.role}" for agent in self.agents])
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -50,7 +50,7 @@ class AgentTools(BaseModel):
|
||||
|
||||
if not agent:
|
||||
return self.i18n.errors("agent_tool_unexsiting_coworker").format(
|
||||
coworkers=", ".join([agent.role for agent in self.agents])
|
||||
coworkers="\n".join([f"- {agent.role}" for agent in self.agents])
|
||||
)
|
||||
|
||||
agent = agent[0]
|
||||
|
||||
Reference in New Issue
Block a user