You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/toolsets.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -439,19 +439,27 @@ A Dynamic Toolset is a toolset that is built dynamically during an Agent run usi
439
439
440
440
To use a Dynamic Toolset, you can pass a function that matches ['`ToolsetFunc`][pydantic_ai.toolsets._dynamic.ToolsetFunc] to the `toolsets` argument of the `Agent` constructor or you can wrap a compliant function in the ['`@agent.toolset`][pydantic_ai.Agent.toolset] decorator.
441
441
442
-
The function will be called with the agent's [run context][pydantic_ai.tools.RunContext] and should return a [`Toolset`][pydantic_ai.toolsets.AbstractToolset] or [`None`][typing.None]. The function will be called once for each agent run step. If you are using the decorator, you can optionally provide a `per_run_step` argument to indicate whether the function should be called once for each agent run step or only once for the entire run.
442
+
The function will be called with the agent's [run context][pydantic_ai.tools.RunContext] and should return a [`Toolset`][pydantic_ai.toolsets.AbstractToolset] or [`None`][typing.None]. The function will be called once for each agent run step. If you are using the decorator, you can optionally provide a `per_run_step` argument to indicate whether the function should be called once for each agent run step or only once for the entire run.
0 commit comments