import { z } from 'zod'; import type { Tool, ToolDialect } from '@qvac/sdk'; import { type GenerationParams, type ResponseFormat, type MessageContentPart } from './common.js'; export declare const chatCompletionsBody: z.ZodObject<{ model: z.ZodString; messages: z.ZodArray; text: z.ZodString; }, z.core.$loose>, z.ZodObject<{ type: z.ZodLiteral<"image_url">; image_url: z.ZodUnion]>; }, z.core.$loose>], "type">>]>>; tool_calls: z.ZodOptional; }, z.core.$strip>>>; tool_call_id: z.ZodOptional; }, z.core.$loose>>; stream: z.ZodOptional; tools: z.ZodOptional; parameters: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$loose>>>; response_format: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"json_object">; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"json_schema">; json_schema: z.ZodObject<{ name: z.ZodOptional; schema: z.ZodRecord; }, z.core.$loose>; }, z.core.$strip>]>>; temperature: z.ZodOptional; top_p: z.ZodOptional; max_tokens: z.ZodOptional; stream_options: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>; export declare const CHAT_UNSUPPORTED_PARAMS: readonly ["logit_bias", "n", "user", "seed", "logprobs", "top_logprobs", "frequency_penalty", "presence_penalty", "stop"]; interface OpenAIMessage { role: string; content: string | null | undefined | MessageContentPart[]; tool_calls?: Array<{ id: string; type: string; function: { name: string; arguments: string; }; }>; tool_call_id?: string; } interface ImageAttachment { ext: string; bytes: Buffer; } interface ChatHistoryItem { role: string; content: string; attachments?: ImageAttachment[]; } interface SdkHistoryItem { role: string; content: string; attachments?: Array<{ path: string; }>; } export declare function openaiMessagesToHistory(messages: OpenAIMessage[], dialect: ToolDialect): ChatHistoryItem[]; export declare function writeChatImages(history: ChatHistoryItem[]): Promise<{ history: SdkHistoryItem[]; tmpPaths: string[]; }>; export declare function messagesHaveToolCalls(messages: OpenAIMessage[]): boolean; export type ChatCompletionsBody = z.infer; export interface SdkChatArgs { history: ChatHistoryItem[]; tools: Tool[] | undefined; generationParams: GenerationParams | undefined; responseFormat: ResponseFormat | undefined; stream: boolean; } export declare function toSdkChatArgs(body: ChatCompletionsBody, dialect: ToolDialect): SdkChatArgs; export {}; //# sourceMappingURL=chat.d.ts.map