Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

StreamProcessorOptions.md

94 lines2.0 KB

Interface: StreamProcessorOptions

Defined in: activities/chat/stream/processor.ts:136

Options for StreamProcessor

Properties

chunkStrategy?

optional chunkStrategy: ChunkStrategy;

Defined in: activities/chat/stream/processor.ts:137


events?

optional events: StreamProcessorEvents;

Defined in: activities/chat/stream/processor.ts:139

New event-driven handlers


handlers?

optional handlers: StreamProcessorHandlers;

Defined in: activities/chat/stream/processor.ts:141

Legacy callback handlers (for backward compatibility)


initialMessages?

optional initialMessages: UIMessage[];

Defined in: activities/chat/stream/processor.ts:148

Initial messages to populate the processor


jsonParser?

optional jsonParser: object;

Defined in: activities/chat/stream/processor.ts:142

parse()

parse: (jsonString) => any;
Parameters
jsonString

string

Returns

any


recording?

optional recording: boolean;

Defined in: activities/chat/stream/processor.ts:146

Enable recording for replay testing