Image content block.
Represents image data in a prompt or message.
Required Fields
type- Always "image" for this variantdata- Base64-encoded image datamime_type- MIME type of the image (e.g., "image/png")
Optional Fields
uri- Optional URI for the image sourceannotations- Additional annotations (map)meta- Additional metadata (map)
Example
%ACPex.Schema.Types.ContentBlock.Image{
type: "image",
data: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
mime_type: "image/png",
uri: "file:///path/to/image.png"
}JSON Representation
{
"type": "image",
"data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"mimeType": "image/png",
"uri": "file:///path/to/image.png"
}
Summary
Functions
Creates a changeset for validation.
Types
Functions
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Creates a changeset for validation.
Required Fields
data- Must be presentmime_type- Must be present
The type field defaults to "image".