Turns streamed tool-call fragments into complete LlmCall.ToolCall values.
Pure and protocol-neutral: it never executes a tool and never sends a result.
Pending calls are keyed by LlmCall.StreamEvent.index, so several calls can
complete independently and out of order.
The core has no JSON decoder, so new/1 takes one:
assembler = LlmCall.StreamAssembler.new(json_decoder: &JSON.decode/1)Without a decoder, a call still arrives with its raw_arguments and an
arguments_error of :no_json_decoder; it never arrives with invented
arguments. The decoder's own message becomes the reason of
{:invalid_json, reason}.
Summary
Types
Functions
@spec feed(t(), LlmCall.StreamEvent.t()) :: {:ok, t(), [LlmCall.ToolCall.t()]}
@spec finish(t()) :: {:ok, t(), [LlmCall.ToolCall.t()]}