Genkit JS API reference
    Preparing search index...

    Interface FlowSideChannel<S>

    Flow execution context for flow to access the streaming callback and side-channel context data. The context itself is a function, a short-cut for streaming callback.

    interface FlowSideChannel<S> {
        abortSignal: AbortSignal;
        context?: ActionContext;
        registry?: Registry;
        sendChunk: StreamingCallback<S>;
        streamingRequested: boolean;
        trace: { spanId: string; traceId: string };
        (chunk: S): void;
    }

    Type Parameters

    • S

    Hierarchy

    • ActionFnArg<S>
      • FlowSideChannel
    • Parameters

      • chunk: S

      Returns void

    Index

    Properties

    abortSignal: AbortSignal

    Abort signal for the action request.

    context?: ActionContext

    Additional runtime context data (ex. auth context data).

    registry?: Registry
    sendChunk: StreamingCallback<S>

    Streaming callback (optional).

    streamingRequested: boolean

    Whether the caller of the action requested streaming.

    trace: { spanId: string; traceId: string }

    Trace context containing trace and span IDs.