A text chunk from a streaming response.
Emitted when the model generates text content. Multiple chunks arrive
sequentially and their :text fields can be concatenated to form the
complete response.
Fields
:text— the generated text fragment:index— position index in the response (defaults to 0)
Example
%LLM.Stream.Chunk{text: "Hello", index: 0}
%LLM.Stream.Chunk{text: " world", index: 0}
# Concatenated: "Hello world"
Summary
Types
@type t() :: %LLM.Stream.Chunk{index: non_neg_integer(), text: String.t()}