processStream
processStream(
stream,options):Promise<CollectedStream>
Defined in: streaming.ts:890
Process a stream with callbacks while also returning the collected result.
Parameters
Section titled “Parameters”stream
Section titled “stream”options
Section titled “options”ProcessStreamOptions = {}
Returns
Section titled “Returns”Promise<CollectedStream>
Example
Section titled “Example”const result = await processStream(stream, { onContent: (delta) => process.stdout.write(delta), onDone: () => console.log('\nDone!'),});