Skip to content

convertChunkMode

convertChunkMode(chunk, targetMode, state, transform?): StreamContentChunk

Defined in: streaming-modes.ts:198

Convert a single content chunk to target mode.

StreamContentChunk

Source content chunk

StreamMode

Target streaming mode

StreamAccumulatorState

Accumulator state (updated in place)

(text) => string

Optional transform function

StreamContentChunk

Converted content chunk