[go: up one dir, main page]

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.

The main traits defined in this module are:

Structs§

PauseControl
Control for pausing and resuming a streaming response
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.

Traits§

StreamingChat
Trait for high-level streaming chat interface
StreamingCompletion
Trait for low-level streaming completion interface
StreamingPrompt
Trait for high-level streaming prompt interface

Functions§

stream_to_stdout
helper function to stream a completion request to stdout

Type Aliases§

StreamingResultNon-WebAssembly