• Preparing search index...
  • The search index is not available
Genkit JS API reference
  • Genkit JS API reference
  • @genkit-ai/express
  • expressHandler

Function expressHandler

  • expressHandler<
        C extends ActionContext = ActionContext,
        I extends z.ZodType<any, any, any, I> = z.ZodTypeAny,
        O extends z.ZodType<any, any, any, O> = z.ZodTypeAny,
        S extends z.ZodType<any, any, any, S> = z.ZodTypeAny,
    >(
        action: Action<I, O, S, ActionRunOptions<S>>,
        opts?: { contextProvider?: ContextProvider<C, I> },
    ): express.RequestHandler
  • Exposes provided flow or an action as express handler.

    Type Parameters

    • C extends ActionContext = ActionContext
    • I extends z.ZodType<any, any, any, I> = z.ZodTypeAny
    • O extends z.ZodType<any, any, any, O> = z.ZodTypeAny
    • S extends z.ZodType<any, any, any, S> = z.ZodTypeAny

    Parameters

    • action: Action<I, O, S, ActionRunOptions<S>>
    • Optionalopts: { contextProvider?: ContextProvider<C, I> }

    Returns express.RequestHandler

    • Defined in index.ts:41

Settings

Member Visibility
Genkit JS API reference
  • Loading...

Generated using TypeDoc with typedoc-github-theme