Adding better support for open source tool calling models (#952)

* Adding better support for open source tool calling models

* making sure the right tool is called

* fixing tests

* better support opensource models
This commit is contained in:
João Moura
2024-07-17 01:54:13 -07:00
committed by GitHub
parent 99ada42d97
commit 7baaeacac3
10 changed files with 5642 additions and 909 deletions

View File

@@ -242,6 +242,8 @@ class CrewAgentExecutor(AgentExecutor, CrewAgentExecutorMixin):
else:
if tool_calling.tool_name.casefold().strip() in [
name.casefold().strip() for name in name_to_tool_map
] or tool_calling.tool_name.casefold().replace("_", " ") in [
name.casefold().strip() for name in name_to_tool_map
]:
observation = tool_usage.use(tool_calling, agent_action.log)
else: