Skip to content

Commit b136db4

Browse files
Update agents.md
1 parent e197187 commit b136db4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/agents.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,17 +206,17 @@ agent = Agent(
206206
- `ToolsToFinalOutputFunction`: A custom function that processes tool results and decides whether to stop or continue with the LLM.
207207

208208
```python
209-
from agents import Agent, Runner, function_tool, FunctionToolResult, RunContextWrapper
209+
from agents import Agent, Runner, function_tool, FunctionToolResult, RunContextWrapper, TContext
210210
from agents.agent import ToolsToFinalOutputResult
211-
from typing import List, Any
211+
from typing import List
212212

213213
@function_tool
214214
def get_weather(city: str) -> str:
215215
"""Returns weather info for the specified city."""
216216
return f"The weather in {city} is sunny"
217217

218218
def custom_tool_handler(
219-
context: RunContextWrapper[Any],
219+
context: RunContextWrapper[TContext],
220220
tool_results: List[FunctionToolResult]
221221
) -> ToolsToFinalOutputResult:
222222
"""Processes tool results to decide final output."""

0 commit comments

Comments
 (0)