Repository navigation
v0.2.0 — Server-Sent Events (SSE) Streaming Token Replayer
🚀 What's New in v0.2.0
🌊 Server-Sent Events (SSE) Streaming Token Replayer (#13)
Deterministic recording and offline replay for streaming LLM responses:
- Automatic Stream Detection: Detects
content-type: text/event-streamresponses automatically. - Chunk-by-Chunk Replay: Records sequential streaming chunks into cassettes and replays them through custom synchronous and asynchronous byte streams without repeat network calls.
- Full Async & Sync Support: Works seamlessly in both
CassetteTransportandAsyncCassetteTransport. - OpenAI Python SDK Integration: Offline support for
client.chat.completions.create(..., stream=True)with 0 outbound calls and $0 token cost during replay. - Configurable Replay Latency: Optional
chunk_delay_msparameter on transports to simulate realistic token generation latency in UI and integration tests.
👥 Contributors
Special thanks to @abhandary14 for contributing PR #14! 👏
📦 Installation
pip install --upgrade rerunner