Genkit JS API reference
    Preparing search index...

    Interface Flow<I, O, S, Init>

    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,
        Init extends z.ZodTypeAny = z.ZodTypeAny,
    > {
        run(
            input?: z.TypeOf<I>,
            options?: ActionRunOptions<z.TypeOf<S>, z.TypeOf<I>>,
        ): Promise<ActionResult<z.TypeOf<O>>>;
        stream(
            input?: z.TypeOf<I>,
            opts?: ActionRunOptions<z.TypeOf<S>, z.TypeOf<I>>,
        ): StreamingResponse<O, S>;
        (
            input?: z.TypeOf<I>,
            options?: ActionRunOptions<z.TypeOf<S>, z.TypeOf<I>>,
        ): Promise<z.TypeOf<O>>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Methods

    Methods

    • Parameters

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