Enum async_gemini::entity::request_body::ContentPart
source · pub enum ContentPart {
Text(TextData),
Inline(InlineData),
File(FileData),
}Expand description
Ordered parts that make up the input. Parts may have different MIME types. For gemini-1.0-pro, only the text field is valid. The token limit is 32k. For gemini-1.0-pro-vision, you may specify either text only, text and up to 16 images, or text and 1 video. The token limit is 16k.
Variants§
Text(TextData)
The text instructions or chat dialogue to include in the prompt.
Inline(InlineData)
Serialized bytes data of the image or video. You can specify at most 1 image with inlineData. To specify up to 16 images, use fileData.
File(FileData)
Trait Implementations§
source§impl Clone for ContentPart
impl Clone for ContentPart
source§fn clone(&self) -> ContentPart
fn clone(&self) -> ContentPart
Returns a copy 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<'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§fn eq(&self, other: &ContentPart) -> bool
fn eq(&self, other: &ContentPart) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for ContentPart
impl Serialize for ContentPart
impl StructuralPartialEq for ContentPart
Auto Trait Implementations§
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