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.
Parameters
Section titled “Parameters”stream
Section titled “stream”Returns
Section titled “Returns”AsyncGenerator<string, void, undefined>
Example
Section titled “Example”for await (const text of streamToTextIterator(stream)) { process.stdout.write(text);}