pub enum MessageContent {
InputText {
text: String,
},
InputImage {
image_url: Option<String>,
detail: ImageDetail,
},
InputFile {
filename: Option<String>,
file_data: Option<String>,
file_url: Option<String>,
},
InputVideo {
video_url: String,
},
OutputText {
text: String,
annotations: Vec<Annotation>,
logprobs: Option<Vec<LogProb>>,
},
Refusal {
refusal: String,
},
PlainText {
text: String,
},
SummaryText {
text: String,
},
ReasoningText {
text: String,
},
}Variants§
Implementations§
Source§impl MessageContent
impl MessageContent
pub fn input_text<S: Into<String>>(text: S) -> Self
pub fn output_text<S: Into<String>>(text: S) -> Self
pub fn refusal<S: Into<String>>(text: S) -> Self
pub fn text<S: Into<String>>(text: S) -> Self
pub fn image_url<S: Into<String>>(url: S) -> Self
pub fn image_url_with_detail<S: Into<String>>( url: S, detail: ImageDetail, ) -> Self
pub fn file_url<S: Into<String>>(url: S) -> Self
pub fn file_data<S: Into<String>>(data: S, filename: Option<String>) -> Self
pub fn video_url<S: Into<String>>(url: S) -> Self
pub fn summary<S: Into<String>>(text: S) -> Self
pub fn reasoning<S: Into<String>>(text: S) -> Self
Trait Implementations§
Source§impl Clone for MessageContent
impl Clone for MessageContent
Source§fn clone(&self) -> MessageContent
fn clone(&self) -> MessageContent
Returns a duplicate of the value. Read more
1.0.0 · 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 MessageContent
impl Debug for MessageContent
Source§impl<'de> Deserialize<'de> for MessageContent
impl<'de> Deserialize<'de> for MessageContent
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 MessageContent
impl PartialEq for MessageContent
Source§impl Serialize for MessageContent
impl Serialize for MessageContent
impl StructuralPartialEq for MessageContent
Auto Trait Implementations§
impl Freeze for MessageContent
impl RefUnwindSafe for MessageContent
impl Send for MessageContent
impl Sync for MessageContent
impl Unpin for MessageContent
impl UnwindSafe for MessageContent
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