Skip to main content
Represents a handler for a graph execution.

Properties

index

readonly index: number
The index of the execution.

Methods

[asyncIterator]

"[asyncIterator]"(): AsyncIterator<GraphOutputStreamResponse<any>>
Enables async iteration over graph output responses.

Returns

AsyncIterator<GraphOutputStreamResponse<any>>

next

next(): Promise<GraphOutputStreamResponse<any>>
Handles the response from a node.

Returns

Promise<GraphOutputStreamResponse<any>> A promise that resolves to the response from the node

setOnFinished

setOnFinished(callback: () => void): void
Sets a callback to be called when the stream is finished. This allows automatic cleanup without user intervention.

Parameters

NameTypeDescription
callback() => voidFunction to call when stream ends

Returns

void