/** * Message types for LLM communication * Based on OpenAI types, simplified for Browser Use */ import { z } from 'zod'; export declare const ContentPartTextParamSchema: z.ZodObject<{ text: z.ZodString; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type?: "text" | undefined; }>; export declare const ContentPartRefusalParamSchema: z.ZodObject<{ refusal: z.ZodString; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "refusal"; refusal: string; }, { refusal: string; type?: "refusal" | undefined; }>; export declare const SupportedImageMediaTypeSchema: z.ZodEnum<["image/jpeg", "image/png", "image/gif", "image/webp"]>; export declare const ImageURLSchema: z.ZodObject<{ url: z.ZodString; detail: z.ZodDefault>; media_type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { url: string; detail: "auto" | "low" | "high"; media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp"; }, { url: string; detail?: "auto" | "low" | "high" | undefined; media_type?: "image/jpeg" | "image/png" | "image/gif" | "image/webp" | undefined; }>; export declare const ContentPartImageParamSchema: z.ZodObject<{ image_url: z.ZodObject<{ url: z.ZodString; detail: z.ZodDefault>; media_type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { url: string; detail: "auto" | "low" | "high"; media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp"; }, { url: string; detail?: "auto" | "low" | "high" | undefined; media_type?: "image/jpeg" | "image/png" | "image/gif" | "image/webp" | undefined; }>; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "image_url"; image_url: { url: string; detail: "auto" | "low" | "high"; media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp"; }; }, { image_url: { url: string; detail?: "auto" | "low" | "high" | undefined; media_type?: "image/jpeg" | "image/png" | "image/gif" | "image/webp" | undefined; }; type?: "image_url" | undefined; }>; export declare const FunctionSchema: z.ZodObject<{ arguments: z.ZodString; name: z.ZodString; }, "strip", z.ZodTypeAny, { arguments: string; name: string; }, { arguments: string; name: string; }>; export declare const ToolCallSchema: z.ZodObject<{ id: z.ZodString; function: z.ZodObject<{ arguments: z.ZodString; name: z.ZodString; }, "strip", z.ZodTypeAny, { arguments: string; name: string; }, { arguments: string; name: string; }>; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { function: { arguments: string; name: string; }; type: "function"; id: string; }, { function: { arguments: string; name: string; }; id: string; type?: "function" | undefined; }>; export declare const UserMessageSchema: z.ZodObject<{ cache: z.ZodDefault; } & { role: z.ZodDefault>; content: z.ZodUnion<[z.ZodString, z.ZodArray>; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type?: "text" | undefined; }>, z.ZodObject<{ image_url: z.ZodObject<{ url: z.ZodString; detail: z.ZodDefault>; media_type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { url: string; detail: "auto" | "low" | "high"; media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp"; }, { url: string; detail?: "auto" | "low" | "high" | undefined; media_type?: "image/jpeg" | "image/png" | "image/gif" | "image/webp" | undefined; }>; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "image_url"; image_url: { url: string; detail: "auto" | "low" | "high"; media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp"; }; }, { image_url: { url: string; detail?: "auto" | "low" | "high" | undefined; media_type?: "image/jpeg" | "image/png" | "image/gif" | "image/webp" | undefined; }; type?: "image_url" | undefined; }>]>, "many">]>; name: z.ZodOptional; }, "strip", z.ZodTypeAny, { role: "user"; cache: boolean; content: string | ({ text: string; type: "text"; } | { type: "image_url"; image_url: { url: string; detail: "auto" | "low" | "high"; media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp"; }; })[]; name?: string | undefined; }, { content: string | ({ text: string; type?: "text" | undefined; } | { image_url: { url: string; detail?: "auto" | "low" | "high" | undefined; media_type?: "image/jpeg" | "image/png" | "image/gif" | "image/webp" | undefined; }; type?: "image_url" | undefined; })[]; name?: string | undefined; role?: "user" | undefined; cache?: boolean | undefined; }>; export declare const SystemMessageSchema: z.ZodObject<{ cache: z.ZodDefault; } & { role: z.ZodDefault>; content: z.ZodUnion<[z.ZodString, z.ZodArray>; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type?: "text" | undefined; }>, "many">]>; name: z.ZodOptional; }, "strip", z.ZodTypeAny, { role: "system"; cache: boolean; content: string | { text: string; type: "text"; }[]; name?: string | undefined; }, { content: string | { text: string; type?: "text" | undefined; }[]; name?: string | undefined; role?: "system" | undefined; cache?: boolean | undefined; }>; export declare const AssistantMessageSchema: z.ZodObject<{ cache: z.ZodDefault; } & { role: z.ZodDefault>; content: z.ZodUnion<[z.ZodString, z.ZodArray>; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type?: "text" | undefined; }>, z.ZodObject<{ refusal: z.ZodString; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "refusal"; refusal: string; }, { refusal: string; type?: "refusal" | undefined; }>]>, "many">, z.ZodNull]>; name: z.ZodOptional; refusal: z.ZodOptional; tool_calls: z.ZodDefault; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { function: { arguments: string; name: string; }; type: "function"; id: string; }, { function: { arguments: string; name: string; }; id: string; type?: "function" | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { role: "assistant"; cache: boolean; content: string | ({ text: string; type: "text"; } | { type: "refusal"; refusal: string; })[] | null; tool_calls: { function: { arguments: string; name: string; }; type: "function"; id: string; }[]; refusal?: string | undefined; name?: string | undefined; }, { content: string | ({ text: string; type?: "text" | undefined; } | { refusal: string; type?: "refusal" | undefined; })[] | null; refusal?: string | undefined; name?: string | undefined; role?: "assistant" | undefined; cache?: boolean | undefined; tool_calls?: { function: { arguments: string; name: string; }; id: string; type?: "function" | undefined; }[] | undefined; }>; export declare const BaseMessageSchema: z.ZodUnion<[z.ZodObject<{ cache: z.ZodDefault; } & { role: z.ZodDefault>; content: z.ZodUnion<[z.ZodString, z.ZodArray>; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type?: "text" | undefined; }>, z.ZodObject<{ image_url: z.ZodObject<{ url: z.ZodString; detail: z.ZodDefault>; media_type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { url: string; detail: "auto" | "low" | "high"; media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp"; }, { url: string; detail?: "auto" | "low" | "high" | undefined; media_type?: "image/jpeg" | "image/png" | "image/gif" | "image/webp" | undefined; }>; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "image_url"; image_url: { url: string; detail: "auto" | "low" | "high"; media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp"; }; }, { image_url: { url: string; detail?: "auto" | "low" | "high" | undefined; media_type?: "image/jpeg" | "image/png" | "image/gif" | "image/webp" | undefined; }; type?: "image_url" | undefined; }>]>, "many">]>; name: z.ZodOptional; }, "strip", z.ZodTypeAny, { role: "user"; cache: boolean; content: string | ({ text: string; type: "text"; } | { type: "image_url"; image_url: { url: string; detail: "auto" | "low" | "high"; media_type: "image/jpeg" | "image/png" | "image/gif" | "image/webp"; }; })[]; name?: string | undefined; }, { content: string | ({ text: string; type?: "text" | undefined; } | { image_url: { url: string; detail?: "auto" | "low" | "high" | undefined; media_type?: "image/jpeg" | "image/png" | "image/gif" | "image/webp" | undefined; }; type?: "image_url" | undefined; })[]; name?: string | undefined; role?: "user" | undefined; cache?: boolean | undefined; }>, z.ZodObject<{ cache: z.ZodDefault; } & { role: z.ZodDefault>; content: z.ZodUnion<[z.ZodString, z.ZodArray>; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type?: "text" | undefined; }>, "many">]>; name: z.ZodOptional; }, "strip", z.ZodTypeAny, { role: "system"; cache: boolean; content: string | { text: string; type: "text"; }[]; name?: string | undefined; }, { content: string | { text: string; type?: "text" | undefined; }[]; name?: string | undefined; role?: "system" | undefined; cache?: boolean | undefined; }>, z.ZodObject<{ cache: z.ZodDefault; } & { role: z.ZodDefault>; content: z.ZodUnion<[z.ZodString, z.ZodArray>; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type?: "text" | undefined; }>, z.ZodObject<{ refusal: z.ZodString; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { type: "refusal"; refusal: string; }, { refusal: string; type?: "refusal" | undefined; }>]>, "many">, z.ZodNull]>; name: z.ZodOptional; refusal: z.ZodOptional; tool_calls: z.ZodDefault; type: z.ZodDefault>; }, "strip", z.ZodTypeAny, { function: { arguments: string; name: string; }; type: "function"; id: string; }, { function: { arguments: string; name: string; }; id: string; type?: "function" | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { role: "assistant"; cache: boolean; content: string | ({ text: string; type: "text"; } | { type: "refusal"; refusal: string; })[] | null; tool_calls: { function: { arguments: string; name: string; }; type: "function"; id: string; }[]; refusal?: string | undefined; name?: string | undefined; }, { content: string | ({ text: string; type?: "text" | undefined; } | { refusal: string; type?: "refusal" | undefined; })[] | null; refusal?: string | undefined; name?: string | undefined; role?: "assistant" | undefined; cache?: boolean | undefined; tool_calls?: { function: { arguments: string; name: string; }; id: string; type?: "function" | undefined; }[] | undefined; }>]>; export type ContentPartTextParam = z.infer; export type ContentPartRefusalParam = z.infer; export type SupportedImageMediaType = z.infer; export type ImageURL = z.infer; export type ContentPartImageParam = z.infer; export type Function = z.infer; export type ToolCall = z.infer; export type UserMessage = z.infer; export type SystemMessage = z.infer; export type AssistantMessage = z.infer; export type BaseMessage = z.infer; export declare class UserMessageHelper implements UserMessage { role: 'user'; content: string | (ContentPartTextParam | ContentPartImageParam)[]; name?: string; cache: boolean; constructor(data: UserMessage); get text(): string; toString(): string; } export declare class SystemMessageHelper implements SystemMessage { role: 'system'; content: string | ContentPartTextParam[]; name?: string; cache: boolean; constructor(data: SystemMessage); get text(): string; toString(): string; } export declare class AssistantMessageHelper implements AssistantMessage { role: 'assistant'; content: string | (ContentPartTextParam | ContentPartRefusalParam)[] | null; name?: string; refusal?: string; tool_calls: ToolCall[]; cache: boolean; constructor(data: AssistantMessage); get text(): string; toString(): string; } export declare function createContentPartText(text: string): ContentPartTextParam; export declare function createContentPartImage(url: string, detail?: 'auto' | 'low' | 'high', media_type?: SupportedImageMediaType): ContentPartImageParam; export declare function createContentPartRefusal(refusal: string): ContentPartRefusalParam; export declare function createImageURL(url: string, detail?: 'auto' | 'low' | 'high', media_type?: SupportedImageMediaType): ImageURL; export declare function createUserMessage(content: string | (ContentPartTextParam | ContentPartImageParam)[], options?: Partial): UserMessage; export declare function createSystemMessage(content: string | ContentPartTextParam[], options?: Partial): SystemMessage; export declare function createAssistantMessage(content: string | (ContentPartTextParam | ContentPartRefusalParam)[] | null, options?: Partial): AssistantMessage; //# sourceMappingURL=messages.d.ts.map