Sycophant.Message.Content.Image (sycophant v0.5.0)

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

Types

t()

@type t() :: %Sycophant.Message.Content.Image{
  __type__: binary(),
  data: nil | binary(),
  media_type: nil | binary(),
  type: binary(),
  url: nil | binary()
}

Functions

t()