Skip to content

Commit

Permalink
adding variations of ask question and delegate work tools
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlious committed Apr 26, 2024
1 parent 3d52575 commit 38d4589
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 2 deletions.
53 changes: 51 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions src/crewai/tools/agent_tools.py
Expand Up @@ -30,6 +30,20 @@ def tools(self):
coworkers=f"[{', '.join([f'{agent.role}' for agent in self.agents])}]"
),
),
StructuredTool.from_function(
func=self.delegate_work,
name="Delegate Work to Coworker",
description=self.i18n.tools("delegate_work").format(
coworkers=f"[{', '.join([f'{agent.role}' for agent in self.agents])}]"
),
),
StructuredTool.from_function(
func=self.ask_question,
name="Ask Question to Coworker",
description=self.i18n.tools("ask_question").format(
coworkers=f"[{', '.join([f'{agent.role}' for agent in self.agents])}]"
),
),
]
return tools

Expand Down

0 comments on commit 38d4589

Please sign in to comment.