View Source OpenaiSseGuard.Snapshot (openai_sse_guard v0.1.0)
Immutable, bounded evidence returned by the observer.
Summary
Types
Protocol shape inferred without retaining provider payloads.
A stream summary safe to persist in a bounded request record.
Observed stream termination state.
Types
@type protocol() :: :chat_completions | :responses | :unknown
Protocol shape inferred without retaining provider payloads.
@type t() :: %OpenaiSseGuard.Snapshot{ error_code: String.t() | nil, event_count: non_neg_integer(), has_output: boolean(), last_event_type: String.t() | nil, malformed_event_count: non_neg_integer(), protocol: protocol(), saw_terminal_event: boolean(), termination: termination() }
A stream summary safe to persist in a bounded request record.
@type termination() :: :open | :done | :incomplete | :error | :unexpected_eof
Observed stream termination state.