#[non_exhaustive]pub struct GenerateContentRequestBody {Show 38 fields
pub messages: Vec<ChatMessage>,
pub model: String,
pub audio: Option<Option<ChatAudioParam>>,
pub frequency_penalty: Option<Option<f64>>,
pub function_call: Option<FunctionCallChoice>,
pub functions: Option<Vec<LegacyFunction>>,
pub logit_bias: Option<Option<BTreeMap<String, f64>>>,
pub logprobs: Option<Option<bool>>,
pub max_completion_tokens: Option<Option<i64>>,
pub max_tokens: Option<Option<i64>>,
pub metadata: Option<Option<BTreeMap<String, String>>>,
pub modalities: Option<Option<Vec<Modality>>>,
pub moderation: Option<Option<Moderation>>,
pub n: Option<Option<i64>>,
pub parallel_tool_calls: Option<bool>,
pub prediction: Option<Option<Prediction>>,
pub presence_penalty: Option<Option<f64>>,
pub prompt_cache_key: Option<Option<String>>,
pub prompt_cache_options: Option<PromptCacheOptions>,
pub prompt_cache_retention: Option<Option<PromptCacheRetention>>,
pub reasoning_effort: Option<Option<ReasoningEffort>>,
pub response_format: Option<ResponseFormat>,
pub safety_identifier: Option<Option<String>>,
pub seed: Option<Option<i64>>,
pub service_tier: Option<Option<ServiceTier>>,
pub stop: Option<Option<Stop>>,
pub store: Option<Option<bool>>,
pub stream: Option<Option<bool>>,
pub stream_options: Option<Option<StreamOptions>>,
pub temperature: Option<Option<f64>>,
pub tool_choice: Option<ToolChoice>,
pub tools: Option<Vec<ChatTool>>,
pub top_logprobs: Option<Option<i64>>,
pub top_p: Option<Option<f64>>,
pub user: Option<Option<String>>,
pub verbosity: Option<Option<Verbosity>>,
pub web_search_options: Option<WebSearchOptions>,
pub rest: Rest,
}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.messages: Vec<ChatMessage>§model: String§audio: Option<Option<ChatAudioParam>>§frequency_penalty: Option<Option<f64>>§function_call: Option<FunctionCallChoice>§functions: Option<Vec<LegacyFunction>>§logit_bias: Option<Option<BTreeMap<String, f64>>>§logprobs: Option<Option<bool>>§max_completion_tokens: Option<Option<i64>>§max_tokens: Option<Option<i64>>§metadata: Option<Option<BTreeMap<String, String>>>§modalities: Option<Option<Vec<Modality>>>§moderation: Option<Option<Moderation>>§n: Option<Option<i64>>§parallel_tool_calls: Option<bool>§prediction: Option<Option<Prediction>>§presence_penalty: Option<Option<f64>>§prompt_cache_key: Option<Option<String>>§prompt_cache_options: Option<PromptCacheOptions>§prompt_cache_retention: Option<Option<PromptCacheRetention>>§reasoning_effort: Option<Option<ReasoningEffort>>§response_format: Option<ResponseFormat>§safety_identifier: Option<Option<String>>§seed: Option<Option<i64>>§service_tier: Option<Option<ServiceTier>>§stop: Option<Option<Stop>>§store: Option<Option<bool>>§stream: Option<Option<bool>>§stream_options: Option<Option<StreamOptions>>§temperature: Option<Option<f64>>§tool_choice: Option<ToolChoice>§tools: Option<Vec<ChatTool>>§top_logprobs: Option<Option<i64>>§top_p: Option<Option<f64>>§user: Option<Option<String>>§verbosity: Option<Option<Verbosity>>§web_search_options: Option<WebSearchOptions>§rest: RestImplementations§
Source§impl GenerateContentRequestBody
impl GenerateContentRequestBody
Sourcepub fn builder(
messages: Vec<ChatMessage>,
model: String,
) -> GenerateContentRequestBodyBuilder
pub fn builder( messages: Vec<ChatMessage>, model: String, ) -> GenerateContentRequestBodyBuilder
Start a builder by supplying the required fields in declaration order.
Trait Implementations§
Source§impl Clone for GenerateContentRequestBody
impl Clone for GenerateContentRequestBody
Source§impl Debug for GenerateContentRequestBody
impl Debug for GenerateContentRequestBody
Source§impl DeclaredFields for GenerateContentRequestBody
impl DeclaredFields for GenerateContentRequestBody
fn into_declared(self) -> Self
Source§impl<'de> Deserialize<'de> for GenerateContentRequestBody
impl<'de> Deserialize<'de> for GenerateContentRequestBody
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 GenerateContentRequestBody
Auto Trait Implementations§
impl Freeze for GenerateContentRequestBody
impl RefUnwindSafe for GenerateContentRequestBody
impl Send for GenerateContentRequestBody
impl Sync for GenerateContentRequestBody
impl Unpin for GenerateContentRequestBody
impl UnsafeUnpin for GenerateContentRequestBody
impl UnwindSafe for GenerateContentRequestBody
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