Sycophant.Message.Content.Image
(sycophant v0.4.2)
Copy Markdown
Image content part for multimodal messages.
Provide either a :url for remote images or :data with base64-encoded
content. When using :data, set :media_type to indicate the format
(e.g. "image/png", "image/jpeg").
Examples
# URL-based image
%Sycophant.Message.Content.Image{url: "https://example.com/photo.jpg"}
# Base64-encoded image
%Sycophant.Message.Content.Image{
data: "iVBORw0KGgo...",
media_type: "image/png"
}
Summary
Functions
Deserializes an image content part from a plain map.