Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 01_ai_agents_first/13_agents_as_tool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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.
If you want, I can turn this into a printable cheat-sheet or a small lab with checkpoints and expected outputs.