diff --git a/01_ai_agents_first/13_agents_as_tool/README.md b/01_ai_agents_first/13_agents_as_tool/README.md index 999f4b27..51447ae0 100644 --- a/01_ai_agents_first/13_agents_as_tool/README.md +++ b/01_ai_agents_first/13_agents_as_tool/README.md @@ -142,9 +142,9 @@ weather_agent:Agent = Agent( @function_tool -def weather_agent_fun(query: str) -> str: +async def weather_agent_fun(query: str) -> str: - result:Runner = Runner.run_sync(weather_agent, query) + result= await Runner.run(weather_agent, query) return result.final_output @@ -253,4 +253,4 @@ If later you need stricter control, replace a tool with a `@function_tool` that - **✅ When to use**: Short, focused subtasks—translate, extract, format—while preserving one conversational owner. - **🔨 How to do it**: Start with `agent.as_tool(...)`; switch to a function tool that calls `Runner.run(...)` when you need more control. -If you want, I can turn this into a printable cheat-sheet or a small lab with checkpoints and expected outputs. \ No newline at end of file +If you want, I can turn this into a printable cheat-sheet or a small lab with checkpoints and expected outputs.