vapi_client/models/
fallback_tavus_voice.rs

1/*
2 * Vapi API
3 *
4 * Voice AI for developers.
5 *
6 * The version of the OpenAPI document: 1.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct FallbackTavusVoice {
16    /// This is the voice provider that will be used.
17    #[serde(rename = "provider")]
18    pub provider: Provider,
19    #[serde(rename = "voiceId")]
20    pub voice_id: models::TavusVoiceVoiceId,
21    /// This is the unique identifier for the persona that the replica will use in the conversation.
22    #[serde(rename = "personaId", skip_serializing_if = "Option::is_none")]
23    pub persona_id: Option<String>,
24    /// This is the url that will receive webhooks with updates regarding the conversation state.
25    #[serde(rename = "callbackUrl", skip_serializing_if = "Option::is_none")]
26    pub callback_url: Option<String>,
27    /// This is the name for the conversation.
28    #[serde(rename = "conversationName", skip_serializing_if = "Option::is_none")]
29    pub conversation_name: Option<String>,
30    /// This is the context that will be appended to any context provided in the persona, if one is provided.
31    #[serde(rename = "conversationalContext", skip_serializing_if = "Option::is_none")]
32    pub conversational_context: Option<String>,
33    /// This is the custom greeting that the replica will give once a participant joines the conversation.
34    #[serde(rename = "customGreeting", skip_serializing_if = "Option::is_none")]
35    pub custom_greeting: Option<String>,
36    /// These are optional properties used to customize the conversation.
37    #[serde(rename = "properties", skip_serializing_if = "Option::is_none")]
38    pub properties: Option<models::TavusConversationProperties>,
39    /// This is the plan for chunking the model output before it is sent to the voice provider.
40    #[serde(rename = "chunkPlan", skip_serializing_if = "Option::is_none")]
41    pub chunk_plan: Option<models::ChunkPlan>,
42}
43
44impl FallbackTavusVoice {
45    pub fn new(provider: Provider, voice_id: models::TavusVoiceVoiceId) -> FallbackTavusVoice {
46        FallbackTavusVoice {
47            provider,
48            voice_id,
49            persona_id: None,
50            callback_url: None,
51            conversation_name: None,
52            conversational_context: None,
53            custom_greeting: None,
54            properties: None,
55            chunk_plan: None,
56        }
57    }
58}
59/// This is the voice provider that will be used.
60#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
61pub enum Provider {
62    #[serde(rename = "tavus")]
63    Tavus,
64}
65
66impl Default for Provider {
67    fn default() -> Provider {
68        Self::Tavus
69    }
70}
71