UNPKG

@arizeai/phoenix-client

Version:
157 lines 6.23 kB
import z from "zod"; /** * * Anthropic Message Schemas * */ export declare const anthropicMessageRoleSchema: z.ZodEnum<{ user: "user"; assistant: "assistant"; }>; export type AnthropicMessageRole = z.infer<typeof anthropicMessageRoleSchema>; /** * TODO: rewrite as discriminated union */ export declare const anthropicMessageSchema: z.ZodObject<{ role: z.ZodEnum<{ user: "user"; assistant: "assistant"; }>; content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image">; source: z.ZodObject<{ data: z.ZodString; media_type: z.ZodEnum<{ "image/jpeg": "image/jpeg"; "image/png": "image/png"; "image/gif": "image/gif"; "image/webp": "image/webp"; }>; type: z.ZodLiteral<"base64">; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ id: z.ZodString; type: z.ZodLiteral<"tool_use">; name: z.ZodString; input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, unknown, z.core.$ZodTypeInternals<import("../../jsonLiteralSchema").JSONLiteral, unknown>>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool_result">; tool_use_id: z.ZodString; content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image">; source: z.ZodObject<{ data: z.ZodString; media_type: z.ZodEnum<{ "image/jpeg": "image/jpeg"; "image/png": "image/png"; "image/gif": "image/gif"; "image/webp": "image/webp"; }>; type: z.ZodLiteral<"base64">; }, z.core.$strip>; }, z.core.$strip>]>>]>; is_error: z.ZodOptional<z.ZodBoolean>; }, z.core.$strip>], "type">>]>; }, z.core.$loose>; export type AnthropicMessage = z.infer<typeof anthropicMessageSchema>; export declare const anthropicMessagesSchema: z.ZodArray<z.ZodObject<{ role: z.ZodEnum<{ user: "user"; assistant: "assistant"; }>; content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image">; source: z.ZodObject<{ data: z.ZodString; media_type: z.ZodEnum<{ "image/jpeg": "image/jpeg"; "image/png": "image/png"; "image/gif": "image/gif"; "image/webp": "image/webp"; }>; type: z.ZodLiteral<"base64">; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ id: z.ZodString; type: z.ZodLiteral<"tool_use">; name: z.ZodString; input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, unknown, z.core.$ZodTypeInternals<import("../../jsonLiteralSchema").JSONLiteral, unknown>>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool_result">; tool_use_id: z.ZodString; content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image">; source: z.ZodObject<{ data: z.ZodString; media_type: z.ZodEnum<{ "image/jpeg": "image/jpeg"; "image/png": "image/png"; "image/gif": "image/gif"; "image/webp": "image/webp"; }>; type: z.ZodLiteral<"base64">; }, z.core.$strip>; }, z.core.$strip>]>>]>; is_error: z.ZodOptional<z.ZodBoolean>; }, z.core.$strip>], "type">>]>; }, z.core.$loose>>; export declare const anthropicMessagesJSONSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodArray<z.ZodObject<{ role: z.ZodEnum<{ user: "user"; assistant: "assistant"; }>; content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image">; source: z.ZodObject<{ data: z.ZodString; media_type: z.ZodEnum<{ "image/jpeg": "image/jpeg"; "image/png": "image/png"; "image/gif": "image/gif"; "image/webp": "image/webp"; }>; type: z.ZodLiteral<"base64">; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ id: z.ZodString; type: z.ZodLiteral<"tool_use">; name: z.ZodString; input: z.ZodType<import("../../jsonLiteralSchema").JSONLiteral, unknown, z.core.$ZodTypeInternals<import("../../jsonLiteralSchema").JSONLiteral, unknown>>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool_result">; tool_use_id: z.ZodString; content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"image">; source: z.ZodObject<{ data: z.ZodString; media_type: z.ZodEnum<{ "image/jpeg": "image/jpeg"; "image/png": "image/png"; "image/gif": "image/gif"; "image/webp": "image/webp"; }>; type: z.ZodLiteral<"base64">; }, z.core.$strip>; }, z.core.$strip>]>>]>; is_error: z.ZodOptional<z.ZodBoolean>; }, z.core.$strip>], "type">>]>; }, z.core.$loose>>>; //# sourceMappingURL=messageSchemas.d.ts.map