Skip to content

TextStream

What streamText returns.

fullStream: AsyncIterable<StreamEvent>

The canonical StreamEvent sequence, terminal included.


result: Promise<StreamedText>

Settles with the run’s ending: resolves on completion or cancellation, rejects with the run’s IndeRunException on failure.


runId: string


textStream: AsyncIterable<string>

Text increments, in order. Ends when the run completes or is cancelled; throws the run’s IndeRunException when it fails, and TextStreamRetractedError when the provider replaces delivered text (use fullStream to render retractions).

cancel(reason?): void

Cancels the run; idempotent.

string

void