import { zodFunction } from "https://deno.land/x/openai@v4.69.0/helpers/zod.ts";
Creates a chat completion function
tool that can be invoked
automatically by the chat completion .runTools()
method or automatically
parsed by .parse()
/ .stream()
.
Type Parameters
Parameters extends ZodType
Parameters
options: { name: string; parameters: Parameters; function?: ((args: zodInfer<Parameters>) => unknown | Promise<unknown>) | undefined; description?: string | undefined; }
Returns
AutoParseableTool<{ arguments: Parameters; name: string; function: (args: zodInfer<Parameters>) => unknown; }>