From d60c78d30f3281b1be4614f696428506d7e97dc8 Mon Sep 17 00:00:00 2001 From: mutahirshah11 Date: Thu, 10 Jul 2025 21:14:51 +0500 Subject: [PATCH] fix(docs): add missing await in streaming example --- docs/streaming.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/streaming.md b/docs/streaming.md index b2c7c095d..41f6c9032 100644 --- a/docs/streaming.md +++ b/docs/streaming.md @@ -21,7 +21,7 @@ async def main(): instructions="You are a helpful assistant.", ) - result = Runner.run_streamed(agent, input="Please tell me 5 jokes.") + result = await Runner.run_streamed(agent, input="Please tell me 5 jokes.") async for event in result.stream_events(): if event.type == "raw_response_event" and isinstance(event.data, ResponseTextDeltaEvent): print(event.data.delta, end="", flush=True) @@ -54,7 +54,7 @@ async def main(): tools=[how_many_jokes], ) - result = Runner.run_streamed( + result = await Runner.run_streamed( agent, input="Hello", )