adk_llm_anthropic_stream (erlang_adk v0.8.0)
View SourceLogical Anthropic Messages SSE decoder and bounded stream assembler.
adk_model_sse_decoder owns byte framing. This module validates the named event/data agreement required by Anthropic, assembles text and tool inputs, and deliberately keeps unknown future event types as binaries.
Summary
Functions
Decode an event emitted by adk_model_sse_decoder. SSE id/retry fields are intentionally ignored at this provider layer.
Decode and apply one provider-neutral SSE envelope.
Types
Functions
-spec content(state()) -> {ok, adk_content:content()} | {error, term()}.
Decode an event emitted by adk_model_sse_decoder. SSE id/retry fields are intentionally ignored at this provider layer.
-spec feed(state(), map()) -> {ok, state(), [emission()]} | {done, term(), state()} | {error, term()}.
Decode and apply one provider-neutral SSE envelope.
-spec new() -> state().