Skip to main content

Module streaming

Module streaming 

Source
Expand description

This module provides functionality for working with streaming completion models. It provides traits and types for generating streaming completion requests and handling streaming completion responses.

Provider implementations use these types to expose raw streamed completion events without depending on a runtime.

Structs§

PauseControl
Control for pausing and resuming a streaming response
RawStreamingToolCall
Describes a streaming tool call response (in its entirety)
StreamingCompletionResponse
The response from a streaming completion request; message and response are populated at the end of the inner stream.

Enums§

RawStreamingChoice
Enum representing a streaming chunk from the model
StreamedAssistantContent
Describes responses from a streamed provider response which is either text, a tool call or a final usage response.
StreamedUserContent
Streamed user content. This content is primarily used to represent tool results from tool calls made during a multi-turn/step agent prompt.
ToolCallDeltaContent
The content of a tool call delta - either the tool name or argument data

Type Aliases§

StreamingResultNot (target_os=unknown and WebAssembly)
Provider stream of raw completion chunks on native targets.