Skip to content

Commit

Permalink
Added LLM guidance for tool description for args, added another demo
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Sze <[email protected]>
  • Loading branch information
marklysze committed Dec 16, 2024
1 parent 63f3949 commit e6bec12
Show file tree
Hide file tree
Showing 2 changed files with 204 additions and 34 deletions.
5 changes: 4 additions & 1 deletion autogen/interoperability/crewai/crewai.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def convert_tool(self, tool: Any) -> Tool:
crewai_tool: CrewAITool = tool # type: ignore[no-any-unimported]

name = _sanitize_name(crewai_tool.name)
description = crewai_tool.description.split("Tool Description: ")[-1]
description = (
crewai_tool.description.split("Tool Description: ")[-1]
+ " (IMPORTANT: When using arguments, put them all in an `args` dictionary)"
)

def func(args: crewai_tool.args_schema) -> Any: # type: ignore[no-any-unimported]
return crewai_tool.run(**args.model_dump())
Expand Down
Loading

0 comments on commit e6bec12

Please sign in to comment.