pub enum Content {
Text(String),
ToolCall(Vec<ToolCall>),
ToolResult(Vec<ToolResult>),
StructuredData(Value),
Image {
data: String,
mime_type: String,
},
Audio {
data: String,
mime_type: String,
},
File {
path: String,
mime_type: String,
},
Error {
code: String,
message: String,
},
}Expand description
Message content types
Variants§
Text(String)
Plain text message
ToolCall(Vec<ToolCall>)
Tool/function call request
ToolResult(Vec<ToolResult>)
Tool/function execution result
StructuredData(Value)
Structured data
Image
Image data (base64 encoded)
Audio
Audio data (base64 encoded)
File
File reference
Error
Error message
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Content
impl<'de> Deserialize<'de> for Content
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 Content
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnsafeUnpin for Content
impl UnwindSafe for Content
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