View Source Anthropic.Messages.StreamEvent (anthropic_community v0.5.0)
Decodes a raw SSE frame ({event_name, data}, as produced by Anthropic.HTTPTransport.SSE)
into a typed event struct. See Anthropic.Messages.StreamAccumulator for folding a stream
of these into a final Anthropic.Messages.Message.
Summary
Functions
Decodes one raw SSE frame's data field into a typed event. event_name is accepted for parity with the SSE frame shape but the wire "type" field inside data is authoritative.
Types
@type t() :: Anthropic.Messages.StreamEvent.MessageStart.t() | Anthropic.Messages.StreamEvent.ContentBlockStart.t() | Anthropic.Messages.StreamEvent.ContentBlockDelta.t() | Anthropic.Messages.StreamEvent.ContentBlockStop.t() | Anthropic.Messages.StreamEvent.MessageDelta.t() | Anthropic.Messages.StreamEvent.MessageStop.t() | Anthropic.Messages.StreamEvent.Ping.t() | Anthropic.Messages.StreamEvent.Error.t()
Functions
Decodes one raw SSE frame's data field into a typed event. event_name is accepted for parity with the SSE frame shape but the wire "type" field inside data is authoritative.