Package-level declarations
Types
Signals that a streaming response terminated without receiving a StreamFrame.End frame.
Represents a frame of a streaming response from a LLM.
Represents a wrapper around a FlowCollector that provides methods for emitting StreamFrame objects.
Represents an error that can occur during buildStreamFrameFlow operations.
Functions
Builds a Flow of StreamFrame objects. Should be used only in case model does not produce completion events.
Collects the textual content of a Flow of StreamFrame objects and returns it as a single string.
Emits a StreamFrame.End with the given finishReason.
Emits a StreamFrame.ReasoningComplete with the given text.
Emits a StreamFrame.ReasoningDelta with the given text and summary.
Emits a StreamFrame.TextComplete with the given text.
Emits a StreamFrame.TextDelta with the given text.
Emits a StreamFrame.ToolCallComplete with the given id, name and content.
Emits a StreamFrame.ToolCallDelta with the given id, name and content.
Returns a transformed flow of StreamFrame.TextDelta objects that contains only the textual content.
Ensures that the stream contains a StreamFrame.End frame before completing.
Builds a Flow of StreamFrame objects.
Create a Flow of StreamFrame.TextDelta objects from a list of String content.
Extracts the assistant response from frames, if any.
Converts frames into Message.Response objects.
Extracts the reasoning response from frames, if any.
Converts a list of Message.Response to a list of StreamFrame. Final StreamFrame.End is also emitted.
Converts a Message.Response to a list of StreamFrame. First it emits the delta frames for each content part for each message, then complete frame with the full message content.
Extracts only tool calls from frames.