• Preparing search index...
  • The search index is not available
Genkit JS API reference
  • Genkit JS API reference
  • genkit
  • tool
  • asTool

Function asTool

  • asTool<
        I extends z.ZodType<any, any, any, I>,
        O extends z.ZodType<any, any, any, O>,
    >(
        registry: Registry,
        action: Action<I, O, z.ZodTypeAny, ActionRunOptions<z.ZodTypeAny>>,
    ): ToolAction<I, O>
  • Converts an action to a tool action by setting the appropriate metadata.

    Type Parameters

    • I extends z.ZodType<any, any, any, I>
    • O extends z.ZodType<any, any, any, O>

    Parameters

    • registry: Registry
    • action: Action<I, O, z.ZodTypeAny, ActionRunOptions<z.ZodTypeAny>>

    Returns ToolAction<I, O>

    • Defined in js/ai/lib/generate-kk52SGan.d.ts:237

Settings

Member Visibility
Genkit JS API reference
  • Loading...

Generated using TypeDoc with typedoc-github-theme