Package-level declarations

Types

Link copied to clipboard
sealed interface StreamFrame

Represents a frame of a streaming response from a LLM.

Link copied to clipboard

Represents a wrapper around a FlowCollector that provides methods for emitting StreamFrame objects.

Link copied to clipboard

Represents an error that can occur during buildStreamFrameFlow operations.

Functions

Link copied to clipboard

Builds a Flow of StreamFrame objects.

Link copied to clipboard

Collects the textual content of a Flow of StreamFrame objects and returns it as a single string.

Link copied to clipboard

Emits a StreamFrame.Append with the given text.

Link copied to clipboard
suspend fun FlowCollector<StreamFrame>.emitEnd(finishReason: String? = null, metaInfo: ResponseMetaInfo? = null)

Emits a StreamFrame.End with the given finishReason.

Link copied to clipboard
suspend fun FlowCollector<StreamFrame>.emitToolCall(id: String?, name: String, content: String)

Emits a StreamFrame.ToolCall with the given id, name and content.

Link copied to clipboard

Returns a transformed flow of StreamFrame.Append objects that contains only the textual content.

Link copied to clipboard

Builds a Flow of StreamFrame objects.

Link copied to clipboard

Create a Flow of StreamFrame.Append objects from a list of String content.

Link copied to clipboard

Extracts the assistant response from frames, if any.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extracts only tool calls from frames.