@arizeai/phoenix-client
Version:
A client for the Phoenix API
47 lines • 1.57 kB
TypeScript
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.ZodPipe<z.ZodOptional<z.ZodLiteral<"function">>, z.ZodTransform<"function", "function" | undefined>>;
id: z.ZodString;
function: z.ZodObject<{
name: z.ZodString;
arguments: z.ZodString;
}, z.core.$loose>;
}, z.core.$strip>;
/**
* 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.ZodPipe<z.ZodOptional<z.ZodLiteral<"function">>, z.ZodTransform<"function", "function" | undefined>>;
id: z.ZodString;
function: z.ZodObject<{
name: z.ZodString;
arguments: z.ZodString;
}, z.core.$loose>;
}, z.core.$strip>>;
/**
* Creates an empty OpenAI tool call with fields but no values filled in
*/
export declare function createOpenAIToolCall(): OpenAIToolCall;
//# sourceMappingURL=toolCallSchemas.d.ts.map