UNPKG

@arizeai/phoenix-client

Version:

A client for the Phoenix API

95 lines 2.71 kB
import z from "zod"; /** * The schema for an OpenAI tool call, this is what a message that calls a tool looks like * * Note: The nested passThrough's are used to allow for extra keys in JSON schema, however, they do not actually * allow for extra keys when the zod schema is used for parsing. This is to allow more flexibility for users * to define their own tool calls according */ export declare const openAIToolCallSchema: z.ZodObject<{ type: z.ZodEffects<z.ZodOptional<z.ZodLiteral<"function">>, "function", "function" | undefined>; id: z.ZodString; function: z.ZodObject<{ name: z.ZodString; arguments: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ name: z.ZodString; arguments: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ name: z.ZodString; arguments: z.ZodString; }, z.ZodTypeAny, "passthrough">>; }, "strip", z.ZodTypeAny, { function: { name: string; arguments: string; } & { [k: string]: unknown; }; type: "function"; id: string; }, { function: { name: string; arguments: string; } & { [k: string]: unknown; }; id: string; type?: "function" | undefined; }>; /** * The type of an OpenAI tool call * * @example * ```typescript * { * id: "1", * function: { * name: "getCurrentWeather", * arguments: { "city": "San Francisco" } * } * } * ``` */ export type OpenAIToolCall = z.infer<typeof openAIToolCallSchema>; /** * The zod schema for multiple OpenAI Tool Calls */ export declare const openAIToolCallsSchema: z.ZodArray<z.ZodObject<{ type: z.ZodEffects<z.ZodOptional<z.ZodLiteral<"function">>, "function", "function" | undefined>; id: z.ZodString; function: z.ZodObject<{ name: z.ZodString; arguments: z.ZodString; }, "passthrough", z.ZodTypeAny, z.objectOutputType<{ name: z.ZodString; arguments: z.ZodString; }, z.ZodTypeAny, "passthrough">, z.objectInputType<{ name: z.ZodString; arguments: z.ZodString; }, z.ZodTypeAny, "passthrough">>; }, "strip", z.ZodTypeAny, { function: { name: string; arguments: string; } & { [k: string]: unknown; }; type: "function"; id: string; }, { function: { name: string; arguments: string; } & { [k: string]: unknown; }; id: string; type?: "function" | undefined; }>, "many">; /** * Creates an empty OpenAI tool call with fields but no values filled in */ export declare function createOpenAIToolCall(): OpenAIToolCall; //# sourceMappingURL=toolCallSchemas.d.ts.map