()
| 16 | |
| 17 | @app.post("/stream") |
| 18 | async def stream(): |
| 19 | result = Runner.run_streamed(agent, input="Tell me a joke") |
| 20 | stream_handler = StreamHandler(result) |
| 21 | return StreamingResponse(stream_handler.stream_events(), media_type="application/x-ndjson") |
| 22 | |
| 23 | |
| 24 | class StreamHandler: |
nothing calls this directly
no test coverage detected