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: pydantic_ai_slim/pydantic_ai/agent/abstract.py
-12Lines changed: 0 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -614,18 +614,6 @@ def run_stream_sync(
614
614
If you want to always run the agent graph to completion and stream events and output at the same time,
615
615
use [`agent.run()`][pydantic_ai.agent.AbstractAgent.run] with an `event_stream_handler` or [`agent.iter()`][pydantic_ai.agent.AbstractAgent.iter] instead.
616
616
617
-
Example:
618
-
```python
619
-
from pydantic_ai import Agent
620
-
621
-
agent = Agent('openai:gpt-4o')
622
-
623
-
def main():
624
-
with agent.run_stream_sync('What is the capital of the UK?') as response:
625
-
print(response.get_output_sync())
626
-
#> The capital of the UK is London.
627
-
```
628
-
629
617
Args:
630
618
user_prompt: User input to start/continue the conversation.
631
619
output_type: Custom output type to use for this run, `output_type` may only be used if the agent has no
0 commit comments