pub struct GenerationConfig {
pub response_modalities: Option<Vec<Modality>>,
pub speech_config: Option<SpeechConfig>,
pub thinking_config: Option<ThinkingConfig>,
pub media_resolution: Option<MediaResolution>,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub top_k: Option<u32>,
pub max_output_tokens: Option<u32>,
pub candidate_count: Option<u32>,
}Expand description
Controls how the model generates responses.
Fields§
§response_modalities: Option<Vec<Modality>>Which modalities the model should produce (AUDIO, TEXT, or both).
For voice-first clients this is typically [AUDIO] or
[AUDIO, TEXT].
speech_config: Option<SpeechConfig>§thinking_config: Option<ThinkingConfig>§media_resolution: Option<MediaResolution>Image resolution hint sent to the model.
temperature: Option<f32>§top_p: Option<f32>§top_k: Option<u32>§max_output_tokens: Option<u32>§candidate_count: Option<u32>Trait Implementations§
Source§impl Clone for GenerationConfig
impl Clone for GenerationConfig
Source§fn clone(&self) -> GenerationConfig
fn clone(&self) -> GenerationConfig
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 GenerationConfig
impl Debug for GenerationConfig
Source§impl Default for GenerationConfig
impl Default for GenerationConfig
Source§fn default() -> GenerationConfig
fn default() -> GenerationConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GenerationConfig
impl<'de> Deserialize<'de> for GenerationConfig
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 GenerationConfig
impl PartialEq for GenerationConfig
Source§impl Serialize for GenerationConfig
impl Serialize for GenerationConfig
impl StructuralPartialEq for GenerationConfig
Auto Trait Implementations§
impl Freeze for GenerationConfig
impl RefUnwindSafe for GenerationConfig
impl Send for GenerationConfig
impl Sync for GenerationConfig
impl Unpin for GenerationConfig
impl UnsafeUnpin for GenerationConfig
impl UnwindSafe for GenerationConfig
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