Skip to content

StreamConversionOptions

Defined in: packages/ai.matey.types/src/streaming.ts:67

Options for stream conversion/transformation.

optional mode: StreamMode

Defined in: packages/ai.matey.types/src/streaming.ts:72

Target streaming mode for conversion. If specified, stream will be converted to this mode.


optional preserveIfMatch: boolean

Defined in: packages/ai.matey.types/src/streaming.ts:80

Whether to preserve original format if already in target mode. When true, avoids unnecessary conversion overhead.

true

optional transform: (text) => string

Defined in: packages/ai.matey.types/src/streaming.ts:87

Custom buffer transform function. Applied to accumulated text before yielding. Useful for sanitization, formatting, etc.

string

string


optional validateSequence: boolean

Defined in: packages/ai.matey.types/src/streaming.ts:95

Whether to validate chunk sequence numbers. When true, throws error if chunks arrive out of order.

false