pub enum FileData {
Data {
data: FileBytes,
},
Url {
url: String,
},
Reference {
reference: JsonObject,
},
Text {
text: String,
},
}Expand description
File data carried in prompts or tool results.
Mirrors SharedV4FileData. A tagged union over inline bytes, URL,
provider reference, or inline text.
Variants§
Data
Inline bytes (base64-encoded when serialized to JSON).
Url
URL pointing to the file.
Reference
Provider-specific reference, e.g. an uploaded file id.
Fields
§
reference: JsonObject{ providerId: id } map.
Text
Inline text payload.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FileData
impl<'de> Deserialize<'de> for FileData
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
impl StructuralPartialEq for FileData
Auto Trait Implementations§
impl Freeze for FileData
impl RefUnwindSafe for FileData
impl Send for FileData
impl Sync for FileData
impl Unpin for FileData
impl UnsafeUnpin for FileData
impl UnwindSafe for FileData
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