vapi_client/models/
google_realtime_config.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct GoogleRealtimeConfig {
17    /// This is the nucleus sampling parameter that controls the cumulative probability of tokens considered during text generation. Only applicable with the Gemini Flash 2.0 Multimodal Live API.
18    #[serde(rename = "topP", skip_serializing_if = "Option::is_none")]
19    pub top_p: Option<f64>,
20    /// This is the top-k sampling parameter that limits the number of highest probability tokens considered during text generation. Only applicable with the Gemini Flash 2.0 Multimodal Live API.
21    #[serde(rename = "topK", skip_serializing_if = "Option::is_none")]
22    pub top_k: Option<f64>,
23    /// This is the presence penalty parameter that influences the model's likelihood to repeat information by penalizing tokens based on their presence in the text. Only applicable with the Gemini Flash 2.0 Multimodal Live API.
24    #[serde(rename = "presencePenalty", skip_serializing_if = "Option::is_none")]
25    pub presence_penalty: Option<f64>,
26    /// This is the frequency penalty parameter that influences the model's likelihood to repeat tokens by penalizing them based on their frequency in the text. Only applicable with the Gemini Flash 2.0 Multimodal Live API.
27    #[serde(rename = "frequencyPenalty", skip_serializing_if = "Option::is_none")]
28    pub frequency_penalty: Option<f64>,
29    /// This is the speech configuration object that defines the voice settings to be used for the model's speech output. Only applicable with the Gemini Flash 2.0 Multimodal Live API.
30    #[serde(rename = "speechConfig", skip_serializing_if = "Option::is_none")]
31    pub speech_config: Option<models::GeminiMultimodalLiveSpeechConfig>,
32}
33
34impl GoogleRealtimeConfig {
35    pub fn new() -> GoogleRealtimeConfig {
36        GoogleRealtimeConfig {
37            top_p: None,
38            top_k: None,
39            presence_penalty: None,
40            frequency_penalty: None,
41            speech_config: None,
42        }
43    }
44}