Agent factory can be async (#247)

This commit is contained in:
Jack Gerrits
2024-07-23 11:49:38 -07:00
committed by GitHub
parent 718fad6e0d
commit a52d3bab53
47 changed files with 352 additions and 299 deletions

View File

@@ -191,8 +191,8 @@ async def main() -> None:
)
]
# Register agents.
runtime.register("tool_executor", lambda: ToolExecutorAgent("Tool Executor", tools))
runtime.register(
await runtime.register("tool_executor", lambda: ToolExecutorAgent("Tool Executor", tools))
await runtime.register(
"tool_use_agent",
lambda: ToolUseAgent(
description="Tool Use Agent",