pub struct MessageImage {
pub url: String,
pub detail: Option<String>,
}Expand description
Represents an image used within a message.
Contains a URL for the image and an optional detail representing the image resolution.
Fields§
§url: StringThe image URL, which may be an HTTP URL or a base64-encoded data URI.
For example:
- “data:image/jpeg;base64,{IMAGE_DATA}”
- “https://example.com/image.jpg”
detail: Option<String>The resolution detail of the image.
For example, for OpenAI API, valid values are:
- “low”
- “medium”
- “auto” (default)
Trait Implementations§
Source§impl Clone for MessageImage
impl Clone for MessageImage
Source§fn clone(&self) -> MessageImage
fn clone(&self) -> MessageImage
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 MessageImage
impl Debug for MessageImage
Source§impl<'de> Deserialize<'de> for MessageImage
impl<'de> Deserialize<'de> for MessageImage
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 MessageImage
impl RefUnwindSafe for MessageImage
impl Send for MessageImage
impl Sync for MessageImage
impl Unpin for MessageImage
impl UnwindSafe for MessageImage
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