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§
- Buffer
Chunks - Collect
Text - Filter
Empty - SseParser
- Utility for parsing Server-Sent Events (SSE).
Traits§
- Stream
Ext - 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§
- Token
Stream - Type alias for a stream of stream chunks.