pub enum ContentPart {
Text {
text: String,
prompt_cache_breakpoint: Option<PromptCacheBreakpoint>,
},
ImageUrl {
image_url: ContentPartImageUrl,
prompt_cache_breakpoint: Option<PromptCacheBreakpoint>,
},
InputAudio {
input_audio: ContentPartInputAudio,
prompt_cache_breakpoint: Option<PromptCacheBreakpoint>,
},
File {
file: ContentPartFile,
prompt_cache_breakpoint: Option<PromptCacheBreakpoint>,
},
}Expand description
A content part of a multimodal user message.
Variants§
Text
Learn about text inputs.
Fields
prompt_cache_breakpoint: Option<PromptCacheBreakpoint>Marks the exact end of a reusable prompt prefix. Inherits its TTL
from the request’s prompt_cache_options.ttl.
ImageUrl
Learn about image inputs.
Fields
image_url: ContentPartImageUrlContains either an image URL or a data URL for a base64 encoded image.
prompt_cache_breakpoint: Option<PromptCacheBreakpoint>Marks the exact end of a reusable prompt prefix. Inherits its TTL
from the request’s prompt_cache_options.ttl.
InputAudio
Learn about audio inputs.
Fields
input_audio: ContentPartInputAudioThe audio input data and its format.
prompt_cache_breakpoint: Option<PromptCacheBreakpoint>Marks the exact end of a reusable prompt prefix. Inherits its TTL
from the request’s prompt_cache_options.ttl.
File
Learn about file inputs.
Fields
file: ContentPartFileThe file input: base64 data, an uploaded file ID, or both with a filename.
prompt_cache_breakpoint: Option<PromptCacheBreakpoint>Marks the exact end of a reusable prompt prefix. Inherits its TTL
from the request’s prompt_cache_options.ttl.