StreamFrameFlowBuilder
Represents a wrapper around a FlowCollector that provides methods for emitting StreamFrame objects.
This is mainly used for combining chunked tool calls and only emit completed tool calls.
Functions
Link copied to clipboard
Emits a StreamFrame.Append with the given text.
Link copied to clipboard
Emits a StreamFrame.End with the given finishReason.
Link copied to clipboard
Emits a pendingToolCallRef if it exists and then clears it.
Link copied to clipboard
suspend fun upsertToolCall(index: Int, id: String? = null, name: String? = null, args: String? = null)
Updates the coroutine context to signal we're currently combining a tool call, this does not emit anything yet, that happens only in tryEmitPendingToolCall.