-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
using gemini and tool call func, return empty response content
async def get_voice() -> float:
# Returns a random stock price for demonstration purposes.
print("tool using")
return random.randint(10, 200)
async def run_tool_agent():
# Create a runtime.
runtime = SingleThreadedAgentRuntime()
# Create the tools.
tools: List[Tool] = [FunctionTool(get_voice, description="get voice")]
# Register the agents.
await ToolAgent.register(runtime, "tool_executor_agent", lambda: ToolAgent("tool executor agent", tools))
await ToolUseAgent.register(
runtime,
"tool_use_agent",
lambda: ToolUseAgent(
GeminiChatCompletionClient(model="gemini-1.5-pro", api_key="apikey"),
[tool.schema for tool in tools], "tool_executor_agent"
),
)
Metadata
Metadata
Assignees
Labels
No labels