pub struct ContentPart {
pub content_type: String,
pub text: Option<String>,
pub image_url: Option<ImageUrl>,
pub detail: Option<String>,
pub text_file: Option<String>,
pub file: Option<FileRef>,
}Expand description
A part of content in a message.
Fields§
§content_type: StringThe type of the content part.
text: Option<String>Text prompt.
image_url: Option<ImageUrl>A public URL of image prompt, only available for vision models.
detail: Option<String>Specifies the detail level of the image.
text_file: Option<String>File path to a text file to be used as prompt.
file: Option<FileRef>File reference for file attachments (OpenAI-compatible nesting).
Trait Implementations§
Source§impl Clone for ContentPart
impl Clone for ContentPart
Source§fn clone(&self) -> ContentPart
fn clone(&self) -> ContentPart
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 ContentPart
impl Debug for ContentPart
Source§impl Default for ContentPart
impl Default for ContentPart
Source§fn default() -> ContentPart
fn default() -> ContentPart
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ContentPart
impl<'de> Deserialize<'de> for ContentPart
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 ContentPart
impl PartialEq for ContentPart
Source§impl Serialize for ContentPart
impl Serialize for ContentPart
impl StructuralPartialEq for ContentPart
Auto Trait Implementations§
impl Freeze for ContentPart
impl RefUnwindSafe for ContentPart
impl Send for ContentPart
impl Sync for ContentPart
impl Unpin for ContentPart
impl UnwindSafe for ContentPart
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