pub enum ContentPart {
Text {
text: String,
},
Thinking {
text: Option<String>,
},
ImageUrl {
url: Url,
},
Image {
media_type: String,
data: Vec<u8>,
},
Audio {
media_type: String,
data: Vec<u8>,
},
Document {
media_type: String,
data: Vec<u8>,
file_name: Option<String>,
},
File {
reference: FileReference,
},
Json {
value: Value,
},
}Expand description
Ordered portable message content.
Variants§
Text
Plain UTF-8 text.
Thinking
Provider-authored thinking replayed with continuation state.
ImageUrl
Remote image input.
Image
Inline image bytes.
Audio
Inline audio bytes.
Document
Inline document bytes.
Fields
File
Provider-managed or remote file input.
Fields
§
reference: FileReferenceExact provider or remote file reference.
Json
Structured function-result content.
Trait Implementations§
Source§impl Clone for ContentPart
impl Clone for ContentPart
Source§impl Debug for ContentPart
impl Debug for ContentPart
Source§impl<'de> Deserialize<'de> for ContentPart
impl<'de> Deserialize<'de> for ContentPart
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
Source§impl PartialEq for ContentPart
impl PartialEq for ContentPart
Source§impl Serialize for ContentPart
impl Serialize for ContentPart
impl StructuralPartialEq for ContentPart
Auto Trait Implementations§
impl Freeze for ContentPart
impl RefUnwindSafe for ContentPart
impl Send for ContentPart
impl Sync for ContentPart
impl Unpin for ContentPart
impl UnsafeUnpin for ContentPart
impl UnwindSafe for ContentPart
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