pub enum InputContentPart {
InputText {
text: String,
},
OutputText {
text: String,
},
InputImage {
image_url: Option<ImageUrl>,
detail: Option<ImageDetail>,
file_id: Option<String>,
},
InputFile {
file_url: String,
},
}Expand description
A content part of an input message or tool output.
Variants§
InputText
A text input part.
OutputText
An assistant text output part (only valid in assistant messages).
InputImage
An image input part. image_url and file_id are mutually
exclusive; exactly one must be provided.
Fields
§
image_url: Option<ImageUrl>The image source: an http(s) URL, a base64 data URL
(data:image/jpeg;base64,...), or OpenAI’s object form.
§
detail: Option<ImageDetail>How the image should be processed.
InputFile
Qwen: a file input part (PDF or image), referenced by a public URL.
Only the qwen3.5-ocr model supports this part type.
Trait Implementations§
Source§impl Clone for InputContentPart
impl Clone for InputContentPart
Source§impl Debug for InputContentPart
impl Debug for InputContentPart
Source§impl<'de> Deserialize<'de> for InputContentPart
impl<'de> Deserialize<'de> for InputContentPart
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InputContentPart
impl RefUnwindSafe for InputContentPart
impl Send for InputContentPart
impl Sync for InputContentPart
impl Unpin for InputContentPart
impl UnsafeUnpin for InputContentPart
impl UnwindSafe for InputContentPart
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more