@arizeai/phoenix-client
Version:
A client for the Phoenix API
119 lines • 4.63 kB
TypeScript
import z from "zod";
export declare const openAIMessageRoleSchema: z.ZodEnum<{
user: "user";
assistant: "assistant";
tool: "tool";
system: "system";
developer: "developer";
}>;
export type OpenAIMessageRole = z.infer<typeof openAIMessageRoleSchema>;
export declare const openAIMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
role: z.ZodLiteral<"assistant">;
content: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>>, z.ZodString]>;
name: z.ZodOptional<z.ZodString>;
tool_call_id: z.ZodOptional<z.ZodString>;
tool_calls: z.ZodOptional<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>>>;
}, z.core.$loose>, z.ZodObject<{
role: z.ZodLiteral<"tool">;
content: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>>, z.ZodString]>;
tool_call_id: z.ZodString;
}, z.core.$loose>, z.ZodObject<{
role: z.ZodLiteral<"function">;
content: z.ZodNullable<z.ZodString>;
name: z.ZodString;
}, z.core.$loose>, z.ZodObject<{
role: z.ZodLiteral<"user">;
content: z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"image_url">;
image_url: z.ZodObject<{
url: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>]>>, z.ZodString]>;
name: z.ZodOptional<z.ZodString>;
}, z.core.$loose>, z.ZodObject<{
role: z.ZodLiteral<"system">;
content: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>>, z.ZodString]>;
name: z.ZodOptional<z.ZodString>;
}, z.core.$loose>, z.ZodObject<{
role: z.ZodLiteral<"developer">;
content: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>>, z.ZodString]>;
name: z.ZodOptional<z.ZodString>;
}, z.core.$loose>], "role">;
export type OpenAIMessage = z.infer<typeof openAIMessageSchema>;
export declare const openAIMessagesSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
role: z.ZodLiteral<"assistant">;
content: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>>, z.ZodString]>;
name: z.ZodOptional<z.ZodString>;
tool_call_id: z.ZodOptional<z.ZodString>;
tool_calls: z.ZodOptional<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>>>;
}, z.core.$loose>, z.ZodObject<{
role: z.ZodLiteral<"tool">;
content: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>>, z.ZodString]>;
tool_call_id: z.ZodString;
}, z.core.$loose>, z.ZodObject<{
role: z.ZodLiteral<"function">;
content: z.ZodNullable<z.ZodString>;
name: z.ZodString;
}, z.core.$loose>, z.ZodObject<{
role: z.ZodLiteral<"user">;
content: z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"image_url">;
image_url: z.ZodObject<{
url: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>]>>, z.ZodString]>;
name: z.ZodOptional<z.ZodString>;
}, z.core.$loose>, z.ZodObject<{
role: z.ZodLiteral<"system">;
content: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>>, z.ZodString]>;
name: z.ZodOptional<z.ZodString>;
}, z.core.$loose>, z.ZodObject<{
role: z.ZodLiteral<"developer">;
content: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>>, z.ZodString]>;
name: z.ZodOptional<z.ZodString>;
}, z.core.$loose>], "role">>;
//# sourceMappingURL=messageSchemas.d.ts.map