pub enum OpenAIContent {
Text(String),
Parts(Vec<OpenAIContentPart>),
}Expand description
OpenAI message content, serialized as either a string or a list of parts.
Images require OpenAIContent::Parts; text-only messages can use
OpenAIContent::Text.
Variants§
Text(String)
Simple text string (backward compatible)
Parts(Vec<OpenAIContentPart>)
Array of content parts (text and/or images)
Trait Implementations§
Source§impl Clone for OpenAIContent
impl Clone for OpenAIContent
Source§impl Debug for OpenAIContent
impl Debug for OpenAIContent
Source§impl<'de> Deserialize<'de> for OpenAIContent
impl<'de> Deserialize<'de> for OpenAIContent
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 OpenAIContent
impl RefUnwindSafe for OpenAIContent
impl Send for OpenAIContent
impl Sync for OpenAIContent
impl Unpin for OpenAIContent
impl UnsafeUnpin for OpenAIContent
impl UnwindSafe for OpenAIContent
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