Skip to main content

Module streaming

Module streaming 

Source
Expand description

Streaming abstractions and utilities.

This module provides types and utilities for handling streaming responses from AI providers, including stream adapters and convenience functions.

Structs§

BufferChunks
CollectText
FilterEmpty
SseParser
Utility for parsing Server-Sent Events (SSE).

Traits§

StreamExt
Extension trait for streams with convenience methods.

Functions§

chunks
Create a stream that yields multiple chunks.
error_stream
Create a stream that immediately yields an error.
from_iter
Create a stream from an iterator of results.
from_string
Create a stream from a string that yields character by character.
from_string_words
Create a stream from a string that yields word by word.
single_chunk
Create a stream that yields a single chunk.

Type Aliases§

TokenStream
Type alias for a stream of stream chunks.