fix: calling link_tools doesnt update agent.tools (#1848)

This commit is contained in:
Vivek Verma
2024-10-08 15:22:28 -07:00
committed by GitHub
parent b808c3688f
commit 1fad0f8df9

View File

@@ -339,6 +339,9 @@ class Agent(BaseAgent):
for tool_name in self.agent_state.tools:
assert tool_name in [tool.name for tool in tools], f"Tool name {tool_name} not included in agent tool list"
# Update tools
self.tools = tools
# Store the functions schemas (this is passed as an argument to ChatCompletion)
self.functions = []
self.functions_python = {}