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/agents.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,10 +214,10 @@ Unlike `run_stream()`, it always runs the agent graph to completion even if text
214
214
To get the best of both worlds, at the expense of some additional complexity, you can use [`agent.iter()`][pydantic_ai.agent.AbstractAgent.iter] as described in the next section, which lets you [iterate over the agent graph](#iterating-over-an-agents-graph) and [stream both events and output](#streaming-all-events-and-output) at every step.
Copy file name to clipboardExpand all lines: docs/multi-agent-applications.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ You'll generally want to pass [`ctx.usage`][pydantic_ai.RunContext.usage] to the
22
22
Agent delegation doesn't need to use the same model for each agent. If you choose to use different models within a run, calculating the monetary cost from the final [`result.usage()`][pydantic_ai.agent.AgentRunResult.usage] of the run will not be possible, but you can still use [`UsageLimits`][pydantic_ai.usage.UsageLimits] to avoid unexpected costs.
23
23
24
24
```python {title="agent_delegation_simple.py"}
25
-
from pydantic_ai import Agent, RunContext, UsageLimits
25
+
from pydantic_ai import Agent, RunContext, UsageLimits
26
26
27
27
joke_selection_agent = Agent( # (1)!
28
28
'openai:gpt-4o',
@@ -180,7 +180,7 @@ Here agents don't need to use the same deps.
180
180
Here we show two agents used in succession, the first to find a flight and the second to extract the user's seat preference.
To use this mode, you can wrap the output type(s) in the [`NativeOutput`][pydantic_ai.output.NativeOutput] marker class that also lets you specify a `name` and `description` if the name and docstring of the type or function are not sufficient.
0 commit comments