import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The role of the message author. Determines how the message is interpreted by the model. */ export declare const Role: { readonly System: "system"; readonly User: "user"; readonly Assistant: "assistant"; readonly Tool: "tool"; readonly Developer: "developer"; }; /** * The role of the message author. Determines how the message is interpreted by the model. */ export type Role = ClosedEnum; export type File2 = { /** * The unique identifier of a previously uploaded file */ fileId: string; /** * Optional filename override */ filename?: string | undefined; }; export type File1 = { /** * The name of the file */ filename: string; /** * Base64-encoded file data */ fileData: string; }; /** * The file to include in the message, either as raw data or by reference */ export type TwoFile = File1 | File2; export type Two4 = { /** * Content type identifier for file content */ type: "file"; /** * The file to include in the message, either as raw data or by reference */ file: File1 | File2; }; /** * The format of the encoded audio data */ export declare const TwoFormat: { readonly Wav: "wav"; readonly Mp3: "mp3"; }; /** * The format of the encoded audio data */ export type TwoFormat = ClosedEnum; export type TwoInputAudio = { /** * Base64-encoded audio data */ data: string; /** * The format of the encoded audio data */ format: TwoFormat; }; export type Two3 = { /** * Content type identifier for audio input content */ type: "input_audio"; inputAudio: TwoInputAudio; }; /** * The detail level of the image analysis. 'low' disables high-res mode, 'high' enables it, 'auto' lets the model decide. */ export declare const TwoDetail: { readonly Auto: "auto"; readonly Low: "low"; readonly High: "high"; }; /** * The detail level of the image analysis. 'low' disables high-res mode, 'high' enables it, 'auto' lets the model decide. */ export type TwoDetail = ClosedEnum; export type ImageUrl = { /** * The URL of the image, or a base64-encoded image data URL */ url: string; /** * The detail level of the image analysis. 'low' disables high-res mode, 'high' enables it, 'auto' lets the model decide. */ detail?: TwoDetail | undefined; }; export type Two2 = { /** * Content type identifier for image URL content */ type: "image_url"; imageUrl: ImageUrl; }; export type Two1 = { /** * Content type identifier for text content */ type: "text"; /** * The text content to include in the message */ text: string; }; /** * A content part that can be included in a message. Supports text, images, audio, and files. */ export type Two = Two1 | Two2 | Two3 | Two4; /** * The contents of the message. Can be a string, an array of content parts (for multimodal inputs), or null for assistant messages with tool calls. */ export type Content = string | Array; /** * The function to be called */ export type OpenAIRequestMessageFunction = { /** * The name of the function to call */ name: string; /** * The arguments to call the function with, as a JSON string */ arguments: string; }; export type ToolCalls = { /** * The ID of the tool call */ id: string; /** * The type of the tool. Currently only 'function' is supported. */ type: "function"; /** * The function to be called */ function: OpenAIRequestMessageFunction; }; /** * A message in the chat completion request. Represents a conversation turn from the user, assistant, system, or tool. */ export type OpenAIRequestMessage = { /** * The role of the message author. Determines how the message is interpreted by the model. */ role: Role; /** * An optional name for the participant. For tool role messages, this is the name of the function called. */ name?: string | undefined; /** * Tool call that this message is responding to. Required when role is 'tool'. */ toolCallId?: string | undefined; /** * The contents of the message. Can be a string, an array of content parts (for multimodal inputs), or null for assistant messages with tool calls. */ content: string | Array | null; /** * The tool calls generated by the model, such as function calls. Only present for assistant messages with tool calls. */ toolCalls?: Array | undefined; }; /** @internal */ export declare const Role$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Role$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const File2$inboundSchema: z.ZodType; /** @internal */ export type File2$Outbound = { file_id: string; filename?: string | undefined; }; /** @internal */ export declare const File2$outboundSchema: z.ZodType; export declare function file2ToJSON(file2: File2): string; export declare function file2FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const File1$inboundSchema: z.ZodType; /** @internal */ export type File1$Outbound = { filename: string; file_data: string; }; /** @internal */ export declare const File1$outboundSchema: z.ZodType; export declare function file1ToJSON(file1: File1): string; export declare function file1FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const TwoFile$inboundSchema: z.ZodType; /** @internal */ export type TwoFile$Outbound = File1$Outbound | File2$Outbound; /** @internal */ export declare const TwoFile$outboundSchema: z.ZodType; export declare function twoFileToJSON(twoFile: TwoFile): string; export declare function twoFileFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Two4$inboundSchema: z.ZodType; /** @internal */ export type Two4$Outbound = { type: "file"; file: File1$Outbound | File2$Outbound; }; /** @internal */ export declare const Two4$outboundSchema: z.ZodType; export declare function two4ToJSON(two4: Two4): string; export declare function two4FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const TwoFormat$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const TwoFormat$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const TwoInputAudio$inboundSchema: z.ZodType; /** @internal */ export type TwoInputAudio$Outbound = { data: string; format: string; }; /** @internal */ export declare const TwoInputAudio$outboundSchema: z.ZodType; export declare function twoInputAudioToJSON(twoInputAudio: TwoInputAudio): string; export declare function twoInputAudioFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Two3$inboundSchema: z.ZodType; /** @internal */ export type Two3$Outbound = { type: "input_audio"; input_audio: TwoInputAudio$Outbound; }; /** @internal */ export declare const Two3$outboundSchema: z.ZodType; export declare function two3ToJSON(two3: Two3): string; export declare function two3FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const TwoDetail$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const TwoDetail$outboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ImageUrl$inboundSchema: z.ZodType; /** @internal */ export type ImageUrl$Outbound = { url: string; detail?: string | undefined; }; /** @internal */ export declare const ImageUrl$outboundSchema: z.ZodType; export declare function imageUrlToJSON(imageUrl: ImageUrl): string; export declare function imageUrlFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Two2$inboundSchema: z.ZodType; /** @internal */ export type Two2$Outbound = { type: "image_url"; image_url: ImageUrl$Outbound; }; /** @internal */ export declare const Two2$outboundSchema: z.ZodType; export declare function two2ToJSON(two2: Two2): string; export declare function two2FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Two1$inboundSchema: z.ZodType; /** @internal */ export type Two1$Outbound = { type: "text"; text: string; }; /** @internal */ export declare const Two1$outboundSchema: z.ZodType; export declare function two1ToJSON(two1: Two1): string; export declare function two1FromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Two$inboundSchema: z.ZodType; /** @internal */ export type Two$Outbound = Two1$Outbound | Two2$Outbound | Two3$Outbound | Two4$Outbound; /** @internal */ export declare const Two$outboundSchema: z.ZodType; export declare function twoToJSON(two: Two): string; export declare function twoFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Content$inboundSchema: z.ZodType; /** @internal */ export type Content$Outbound = string | Array; /** @internal */ export declare const Content$outboundSchema: z.ZodType; export declare function contentToJSON(content: Content): string; export declare function contentFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const OpenAIRequestMessageFunction$inboundSchema: z.ZodType; /** @internal */ export type OpenAIRequestMessageFunction$Outbound = { name: string; arguments: string; }; /** @internal */ export declare const OpenAIRequestMessageFunction$outboundSchema: z.ZodType; export declare function openAIRequestMessageFunctionToJSON(openAIRequestMessageFunction: OpenAIRequestMessageFunction): string; export declare function openAIRequestMessageFunctionFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const ToolCalls$inboundSchema: z.ZodType; /** @internal */ export type ToolCalls$Outbound = { id: string; type: "function"; function: OpenAIRequestMessageFunction$Outbound; }; /** @internal */ export declare const ToolCalls$outboundSchema: z.ZodType; export declare function toolCallsToJSON(toolCalls: ToolCalls): string; export declare function toolCallsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const OpenAIRequestMessage$inboundSchema: z.ZodType; /** @internal */ export type OpenAIRequestMessage$Outbound = { role: string; name?: string | undefined; tool_call_id?: string | undefined; content: string | Array | null; tool_calls?: Array | undefined; }; /** @internal */ export declare const OpenAIRequestMessage$outboundSchema: z.ZodType; export declare function openAIRequestMessageToJSON(openAIRequestMessage: OpenAIRequestMessage): string; export declare function openAIRequestMessageFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=openairequestmessage.d.ts.map