pub struct Attachment {Show 13 fields
pub base64: Option<String>,
pub content: Option<String>,
pub content_type: Option<String>,
pub data: Option<String>,
pub detail: Option<AttachmentDetail>,
pub filename: Option<String>,
pub metadata: Map<String, Value>,
pub mime_type: Option<String>,
pub name: Option<String>,
pub text: Option<String>,
pub type_: Option<AttachmentType>,
pub uri: Option<String>,
pub url: Option<String>,
}Expand description
Attachment
JSON schema
{
"type": "object",
"properties": {
"base64": {
"type": "string"
},
"content": {
"type": "string"
},
"contentType": {
"type": "string"
},
"data": {
"type": "string"
},
"detail": {
"type": "string",
"enum": [
"auto",
"low",
"high"
]
},
"filename": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": true
},
"mimeType": {
"type": "string"
},
"name": {
"type": "string"
},
"text": {
"type": "string"
},
"type": {
"description": "Advisory attachment kind. Agents and workflows pass attachments through without model-capability gating.",
"type": "string",
"enum": [
"image",
"audio",
"video",
"pdf",
"file",
"text",
"json",
"url"
]
},
"uri": {
"type": "string"
},
"url": {
"type": "string"
}
},
"additionalProperties": true
}Fields§
§base64: Option<String>§content: Option<String>§content_type: Option<String>§data: Option<String>§detail: Option<AttachmentDetail>§filename: Option<String>§metadata: Map<String, Value>§mime_type: Option<String>§name: Option<String>§text: Option<String>§type_: Option<AttachmentType>Advisory attachment kind. Agents and workflows pass attachments through without model-capability gating.
uri: Option<String>§url: Option<String>Implementations§
Source§impl Attachment
impl Attachment
pub fn builder() -> Attachment
Trait Implementations§
Source§impl Clone for Attachment
impl Clone for Attachment
Source§fn clone(&self) -> Attachment
fn clone(&self) -> Attachment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Attachment
impl Debug for Attachment
Source§impl Default for Attachment
impl Default for Attachment
Source§impl<'de> Deserialize<'de> for Attachment
impl<'de> Deserialize<'de> for Attachment
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 From<Attachment> for AttachmentInput
impl From<Attachment> for AttachmentInput
Source§fn from(value: Attachment) -> Self
fn from(value: Attachment) -> Self
Converts to this type from the input type.
Source§impl From<Attachment> for Attachment
impl From<Attachment> for Attachment
Source§fn from(value: Attachment) -> Self
fn from(value: Attachment) -> Self
Converts to this type from the input type.
Source§impl Serialize for Attachment
impl Serialize for Attachment
Source§impl TryFrom<Attachment> for Attachment
impl TryFrom<Attachment> for Attachment
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: Attachment) -> Result<Self, ConversionError>
fn try_from(value: Attachment) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for Attachment
impl RefUnwindSafe for Attachment
impl Send for Attachment
impl Sync for Attachment
impl Unpin for Attachment
impl UnsafeUnpin for Attachment
impl UnwindSafe for Attachment
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