adk_model_sse_decoder (erlang_adk v0.8.0)
View SourceBounded incremental Server-Sent Events decoder for model providers.
The decoder is deliberately transport- and provider-neutral. It accepts arbitrary TCP/HTTP chunk boundaries, supports LF and CRLF line endings, joins repeated data fields with a newline, and never creates atoms from remote field names or event types.
Summary
Types
-type event() :: #{data := binary(), event => binary(), id => binary(), retry => non_neg_integer()}.
-type state() :: map().