Skip to content

streamToTextIterator

streamToTextIterator(stream): AsyncGenerator<string, void, undefined>

Defined in: streaming.ts:471

Convert an IR stream to a simple text iterator. Yields content deltas as strings and throws on errors.

IRChatStream

AsyncGenerator<string, void, undefined>

for await (const text of streamToTextIterator(stream)) {
process.stdout.write(text);
}