Genkit JS API reference
    Preparing search index...

    Interface Flow<I, O, S>

    Flow is an observable, streamable, (optionally) strongly typed function.

    interface Flow<
        I extends z.ZodTypeAny = z.ZodTypeAny,
        O extends z.ZodTypeAny = z.ZodTypeAny,
        S extends z.ZodTypeAny = z.ZodTypeAny,
    > {
        __action: ActionMetadata<I, O, S>;
        __registry?: Registry;
        run(
            input?: z.TypeOf<I>,
            options?: ActionRunOptions<z.TypeOf<S>>,
        ): Promise<ActionResult<z.TypeOf<O>>>;
        stream(
            input?: z.TypeOf<I>,
            opts?: ActionRunOptions<z.TypeOf<S>>,
        ): StreamingResponse<O, S>;
        (
            input?: z.TypeOf<I>,
            options?: ActionRunOptions<z.TypeOf<S>>,
        ): Promise<z.TypeOf<O>>;
    }

    Type Parameters

    Hierarchy (View Summary)

    • Parameters

      Returns Promise<z.TypeOf<O>>

    Index

    Properties

    Methods

    Properties

    __action: ActionMetadata<I, O, S>
    __registry?: Registry

    Methods

    • Parameters

      Returns Promise<ActionResult<z.TypeOf<O>>>