import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The function definition */ export type FunctionT = { /** * The name of the function to be called. Must be a-z, A-Z, 0-9, underscores and dashes, with a maximum length of 64 characters. */ name: string; /** * A description of what the function does. Used by the model to choose when and how to call the function. */ description?: string | undefined; /** * The parameters the function accepts, described as a JSON Schema object. Omit to accept no parameters. */ parameters?: any | undefined; }; /** * A tool the model may call while generating a response. */ export type OpenAIToolDefinition = { /** * The type of the tool. Currently only 'function' is supported. */ type: "function"; /** * The function definition */ function: FunctionT; }; /** @internal */ export declare const FunctionT$inboundSchema: z.ZodType; /** @internal */ export type FunctionT$Outbound = { name: string; description?: string | undefined; parameters?: any | undefined; }; /** @internal */ export declare const FunctionT$outboundSchema: z.ZodType; export declare function functionToJSON(functionT: FunctionT): string; export declare function functionFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const OpenAIToolDefinition$inboundSchema: z.ZodType; /** @internal */ export type OpenAIToolDefinition$Outbound = { type: "function"; function: FunctionT$Outbound; }; /** @internal */ export declare const OpenAIToolDefinition$outboundSchema: z.ZodType; export declare function openAIToolDefinitionToJSON(openAIToolDefinition: OpenAIToolDefinition): string; export declare function openAIToolDefinitionFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=openaitooldefinition.d.ts.map