View Source LlmComposer.ProviderStreamChunk protocol (llm_composer v0.19.2)
Protocol that normalizes provider stream payloads into LlmComposer.StreamChunk structs.
Each provider must wrap its decoded JSON chunk into a provider-specific struct and implement this protocol so the central parser can treat every event uniformly.
Summary
Types
@type t() :: term()
All the types that implement this protocol.
Functions
@spec to_stream_chunk( t(), keyword() ) :: {:ok, LlmComposer.StreamChunk.t()} | :skip | {:error, term()}