#[non_exhaustive]pub struct EmbeddedGenerateContentRequest {
pub model: String,
pub contents: Vec<Content>,
pub tools: Option<Vec<Tool>>,
pub tool_config: Option<ToolConfig>,
pub safety_settings: Option<Vec<SafetySetting>>,
pub labels: Option<BTreeMap<String, String>>,
pub system_instruction: Option<Content>,
pub generation_config: Option<GenerationConfig>,
pub cached_content: Option<String>,
pub service_tier: Option<ServiceTier>,
pub store: Option<bool>,
pub rest: Rest,
}Expand description
Full GenerateContentRequest object accepted inside CountTokens. Its
model is part of this embedded Batch API object; standalone REST
generation keeps model in its path.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.model: StringRequired by the Batch API GenerateContentRequest embedded in CountTokens.
contents: Vec<Content>§tools: Option<Vec<Tool>>§tool_config: Option<ToolConfig>§safety_settings: Option<Vec<SafetySetting>>§labels: Option<BTreeMap<String, String>>§system_instruction: Option<Content>§generation_config: Option<GenerationConfig>§cached_content: Option<String>§service_tier: Option<ServiceTier>§store: Option<bool>§rest: RestImplementations§
Trait Implementations§
Source§impl DeclaredFields for EmbeddedGenerateContentRequest
impl DeclaredFields for EmbeddedGenerateContentRequest
fn into_declared(self) -> Self
Source§impl<'de> Deserialize<'de> for EmbeddedGenerateContentRequest
impl<'de> Deserialize<'de> for EmbeddedGenerateContentRequest
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
impl StructuralPartialEq for EmbeddedGenerateContentRequest
Auto Trait Implementations§
impl Freeze for EmbeddedGenerateContentRequest
impl RefUnwindSafe for EmbeddedGenerateContentRequest
impl Send for EmbeddedGenerateContentRequest
impl Sync for EmbeddedGenerateContentRequest
impl Unpin for EmbeddedGenerateContentRequest
impl UnsafeUnpin for EmbeddedGenerateContentRequest
impl UnwindSafe for EmbeddedGenerateContentRequest
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