add toolset base class and allow llm agent to accept toolset as tools

PiperOrigin-RevId: 756605470
This commit is contained in:
Xiang (Sean) Zhou
2025-05-08 22:27:13 -07:00
committed by Copybara-Service
parent 8963300518
commit 4d7298e4f2
10 changed files with 129 additions and 39 deletions

View File

@@ -258,7 +258,7 @@ class EvaluationGenerator:
if not isinstance(agent, Agent) and not isinstance(agent, LlmAgent):
return
for tool in agent.canonical_tools:
for tool in await agent.canonical_tools():
tool_name = tool.name
if tool_name in all_mock_tools:
agent.before_tool_callback = callback