OpenAIMessageContent
OpenAIMessageContent =
string| ({text:string;type:"text"; } | {image_url: {detail?:"auto"|"low"|"high";url:string; };type:"image_url"; })[]
Defined in: adapters/openai.ts:54
OpenAI message content type supporting text and multimodal inputs.
Can be either a simple string for text-only messages, or an array of content blocks for multimodal messages that include images. The array form supports mixing text and images in a single message.
Example
Section titled “Example”// Simple textconst textContent: OpenAIMessageContent = "Hello, world!";
// Multimodal with imageconst multimodalContent: OpenAIMessageContent = [ { type: 'text', text: 'What is in this image?' }, { type: 'image_url', image_url: { url: 'https://example.com/photo.jpg', detail: 'high' } }];