Skip to content

AskStream

Defined in: src/types.ts:239

The return type of ask(). An AsyncIterable that can also be reduced to a TurnResult.

Extends

Methods

[asyncIterator]()

[asyncIterator](): AsyncIterator<StreamEvent, any, any>

Defined in: docs/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts:36

Returns

AsyncIterator<StreamEvent, any, any>

Inherited from

AsyncIterable.[asyncIterator]


result()

result(): Promise<TurnResult>

Defined in: src/types.ts:245

Get the reduced TurnResult. Can be called at any point — if the stream is still in progress, this awaits completion. If iteration has already completed, returns the cached result immediately.

Returns

Promise<TurnResult>