pub enum ContentBlock {
Text {
text: String,
},
ImageBase64 {
data: String,
media_type: String,
},
ImageUrl {
url: String,
detail: String,
},
VideoPath {
path: String,
fps: Option<f32>,
max_frames: Option<u32>,
},
VideoUrl {
url: String,
fps: Option<f32>,
max_frames: Option<u32>,
},
VideoBase64 {
data: String,
media_type: String,
fps: Option<f32>,
max_frames: Option<u32>,
},
AudioPath {
path: String,
sample_rate: Option<u32>,
},
AudioUrl {
url: String,
sample_rate: Option<u32>,
},
AudioBase64 {
data: String,
media_type: String,
sample_rate: Option<u32>,
},
}Expand description
A content block in a multimodal message.
The image variants (ImageBase64, ImageUrl) are fully wired on
the native Qwen2.5-VL backend. The video variants
(VideoPath, VideoUrl, VideoBase64) are defined on the public
request surface so higher-level tooling can express Qwen2.5-VL
video-understanding payloads, but the native backend returns
UnsupportedMode for them until the video-tokenization path lands.
Remote multimodal providers (Anthropic, Google Vertex) accept them
through the protocol handlers today.
Variants§
Text
Plain text content.
ImageBase64
Base64-encoded image.
Fields
ImageUrl
Image from URL.
Fields
VideoPath
Video loaded from a local filesystem path. Qwen2.5-VL samples
the clip at fps frames/sec (default: backend-chosen) and
caps at max_frames to respect context budgets.
VideoUrl
Video accessible over HTTP(S). Semantics as ContentBlock::VideoPath.
VideoBase64
Base64-encoded video bytes. Prefer VideoPath when possible;
inline base64 is expensive to round-trip.
AudioPath
Audio loaded from a local filesystem path. Used for audio-understanding models (Gemma 4 small variants, Gemini).
Fields
AudioUrl
Audio accessible over HTTP(S).
AudioBase64
Base64-encoded audio bytes.