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
+7-14Lines changed: 7 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ import asyncio
116
116
from collections.abc import AsyncIterable
117
117
from datetime import date
118
118
119
-
from pydantic_ai import Agent
119
+
from pydantic_ai import Agent, RunContext
120
120
from pydantic_ai.messages import (
121
121
AgentStreamEvent,
122
122
FinalResultEvent,
@@ -128,7 +128,6 @@ from pydantic_ai.messages import (
128
128
ThinkingPartDelta,
129
129
ToolCallPartDelta,
130
130
)
131
-
from pydantic_ai.tools import RunContext
132
131
133
132
weather_agent = Agent(
134
133
'openai:gpt-4o',
@@ -215,10 +214,10 @@ Unlike `run_stream()`, it always runs the agent graph to completion even if text
215
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.
@@ -338,7 +338,7 @@ For privacy and security reasons, you may want to monitor your agent's behavior
338
338
When `include_content=False` is set, Pydantic AI will exclude sensitive content from OpenTelemetry events, including user prompts and model completions, tool call arguments and responses, and any other message content.
0 commit comments