07 Streaming#
Script: example/07_streaming.py.
Streaming sends normalized RathLLMStreamDelta objects to on_event while the loop still appends one durable assistant chunk after the model round completes.
python example/07_streaming.py
Delta field |
Meaning |
|---|---|
|
Incremental assistant text. |
|
Terminal reason for the model round. |
|
Provider-reported token usage when available. |
OpenAI-compatible and Anthropic built-in clients both support streaming in v1.2.