Skip to content

Commit d60c78d

Browse files
committed
fix(docs): add missing await in streaming example
1 parent db85a6d commit d60c78d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/streaming.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async def main():
2121
instructions="You are a helpful assistant.",
2222
)
2323

24-
result = Runner.run_streamed(agent, input="Please tell me 5 jokes.")
24+
result = await Runner.run_streamed(agent, input="Please tell me 5 jokes.")
2525
async for event in result.stream_events():
2626
if event.type == "raw_response_event" and isinstance(event.data, ResponseTextDeltaEvent):
2727
print(event.data.delta, end="", flush=True)
@@ -54,7 +54,7 @@ async def main():
5454
tools=[how_many_jokes],
5555
)
5656

57-
result = Runner.run_streamed(
57+
result = await Runner.run_streamed(
5858
agent,
5959
input="Hello",
6060
)

0 commit comments

Comments
 (0)