MCPcopy Index your code
hub / github.com/openai/openai-agents-python / StreamHandler

Class StreamHandler

tests/fastapi/streaming_app.py:24–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23
24class StreamHandler:
25 def __init__(self, result: RunResultStreaming):
26 self.result = result
27
28 async def stream_events(self) -> AsyncIterator[str]:
29 async for event in self.result.stream_events():
30 yield f"{event.type}\n\n"

Callers 1

streamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected