Genkit JS API reference
    Preparing search index...

    Type Alias ActionStreamSubscriber<S, O>

    Subscriber callbacks for receiving stream events.

    type ActionStreamSubscriber<S, O> = {
        onChunk: (chunk: S) => void;
        onDone: (output: O) => void;
        onError: (error: any) => void;
    }

    Type Parameters

    • S

      The type of the stream chunks.

    • O

      The type of the final output.

    Index

    Properties

    onChunk: (chunk: S) => void

    Called when a chunk is received.

    onDone: (output: O) => void

    Called when the stream completes successfully.

    onError: (error: any) => void

    Called when the stream encounters an error.