Skip to main content

DONE_SENTINEL

Constant DONE_SENTINEL 

Source
pub const DONE_SENTINEL: &str = "data: [DONE]\n\n";
Expand description

The SSE stream-terminator sentinel.

Must be sent by the caller exactly once, only after the entire event stream from SseEncoder::encode is truly exhausted — never bundled into an individual event’s encoding, since LlmStreamEvent::Done is not guaranteed to be the last event (a trailing LlmStreamEvent::Usage can legitimately follow it) and nothing may be sent after [DONE] on the wire.