From b136db4f37b9f85650a26f394d778759d0e44382 Mon Sep 17 00:00:00 2001 From: muhammadhamidrazasidtechno <160109562+muhammadhamidrazasidtechno@users.noreply.github.com> Date: Sun, 3 Aug 2025 17:57:05 +0500 Subject: [PATCH] Update agents.md --- docs/agents.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/agents.md b/docs/agents.md index 30058fa48..6ae2fd45f 100644 --- a/docs/agents.md +++ b/docs/agents.md @@ -206,9 +206,9 @@ agent = Agent( - `ToolsToFinalOutputFunction`: A custom function that processes tool results and decides whether to stop or continue with the LLM. ```python -from agents import Agent, Runner, function_tool, FunctionToolResult, RunContextWrapper +from agents import Agent, Runner, function_tool, FunctionToolResult, RunContextWrapper, TContext from agents.agent import ToolsToFinalOutputResult -from typing import List, Any +from typing import List @function_tool def get_weather(city: str) -> str: @@ -216,7 +216,7 @@ def get_weather(city: str) -> str: return f"The weather in {city} is sunny" def custom_tool_handler( - context: RunContextWrapper[Any], + context: RunContextWrapper[TContext], tool_results: List[FunctionToolResult] ) -> ToolsToFinalOutputResult: """Processes tool results to decide final output."""