vapi-client 0.4.2

Unofficial crate for Vapi - Voice AI for developers.
Documentation
/*
 * Vapi API
 *
 * Voice AI for developers.
 *
 * The version of the OpenAPI document: 1.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// CreateAssistantDtoModel : These are the options for the assistant's LLM.
/// These are the options for the assistant's LLM.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum CreateAssistantDtoModel {
    AnthropicModel(models::AnthropicModel),
    AnyscaleModel(models::AnyscaleModel),
    CerebrasModel(models::CerebrasModel),
    CustomLlmModel(models::CustomLlmModel),
    DeepInfraModel(models::DeepInfraModel),
    DeepSeekModel(models::DeepSeekModel),
    GoogleModel(models::GoogleModel),
    GroqModel(models::GroqModel),
    InflectionAiModel(models::InflectionAiModel),
    OpenAiModel(models::OpenAiModel),
    OpenRouterModel(models::OpenRouterModel),
    PerplexityAiModel(models::PerplexityAiModel),
    TogetherAiModel(models::TogetherAiModel),
    XaiModel(models::XaiModel),
}

impl Default for CreateAssistantDtoModel {
    fn default() -> Self {
        Self::AnthropicModel(Default::default())
    }
}
/// This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ModelTrue {
    #[serde(rename = "grok-beta")]
    GrokBeta,
    #[serde(rename = "grok-2")]
    Grok2,
    #[serde(rename = "grok-3")]
    Grok3,
}

impl Default for ModelTrue {
    fn default() -> ModelTrue {
        Self::GrokBeta
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ProviderTrue {
    #[serde(rename = "xai")]
    Xai,
}

impl Default for ProviderTrue {
    fn default() -> ProviderTrue {
        Self::Xai
    }
}
/// This determines whether metadata is sent in requests to the custom provider.  - `off` will not send any metadata. payload will look like `{ messages }` - `variable` will send `assistant.metadata` as a variable on the payload. payload will look like `{ messages, metadata }` - `destructured` will send `assistant.metadata` fields directly on the payload. payload will look like `{ messages, ...metadata }`  Further, `variable` and `destructured` will send `call`, `phoneNumber`, and `customer` objects in the payload.  Default is `variable`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum MetadataSendModeTrue {
    #[serde(rename = "off")]
    Off,
    #[serde(rename = "variable")]
    Variable,
    #[serde(rename = "destructured")]
    Destructured,
}

impl Default for MetadataSendModeTrue {
    fn default() -> MetadataSendModeTrue {
        Self::Off
    }
}
/// These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum FallbackModelsTrue {
    #[serde(rename = "gpt-4.1-2025-04-14")]
    Gpt4Period120250414,
    #[serde(rename = "gpt-4.1-mini-2025-04-14")]
    Gpt4Period1Mini20250414,
    #[serde(rename = "gpt-4.1-nano-2025-04-14")]
    Gpt4Period1Nano20250414,
    #[serde(rename = "gpt-4.1")]
    Gpt4Period1,
    #[serde(rename = "gpt-4.1-mini")]
    Gpt4Period1Mini,
    #[serde(rename = "gpt-4.1-nano")]
    Gpt4Period1Nano,
    #[serde(rename = "gpt-4.5-preview")]
    Gpt4Period5Preview,
    #[serde(rename = "chatgpt-4o-latest")]
    Chatgpt4oLatest,
    #[serde(rename = "o3")]
    O3,
    #[serde(rename = "o3-mini")]
    O3Mini,
    #[serde(rename = "o4-mini")]
    O4Mini,
    #[serde(rename = "o1-preview")]
    O1Preview,
    #[serde(rename = "o1-preview-2024-09-12")]
    O1Preview20240912,
    #[serde(rename = "o1-mini")]
    O1Mini,
    #[serde(rename = "o1-mini-2024-09-12")]
    O1Mini20240912,
    #[serde(rename = "gpt-4o-realtime-preview-2024-10-01")]
    Gpt4oRealtimePreview20241001,
    #[serde(rename = "gpt-4o-realtime-preview-2024-12-17")]
    Gpt4oRealtimePreview20241217,
    #[serde(rename = "gpt-4o-mini-realtime-preview-2024-12-17")]
    Gpt4oMiniRealtimePreview20241217,
    #[serde(rename = "gpt-4o-mini-2024-07-18")]
    Gpt4oMini20240718,
    #[serde(rename = "gpt-4o-mini")]
    Gpt4oMini,
    #[serde(rename = "gpt-4o")]
    Gpt4o,
    #[serde(rename = "gpt-4o-2024-05-13")]
    Gpt4o20240513,
    #[serde(rename = "gpt-4o-2024-08-06")]
    Gpt4o20240806,
    #[serde(rename = "gpt-4o-2024-11-20")]
    Gpt4o20241120,
    #[serde(rename = "gpt-4-turbo")]
    Gpt4Turbo,
    #[serde(rename = "gpt-4-turbo-2024-04-09")]
    Gpt4Turbo20240409,
    #[serde(rename = "gpt-4-turbo-preview")]
    Gpt4TurboPreview,
    #[serde(rename = "gpt-4-0125-preview")]
    Gpt40125Preview,
    #[serde(rename = "gpt-4-1106-preview")]
    Gpt41106Preview,
    #[serde(rename = "gpt-4")]
    Gpt4,
    #[serde(rename = "gpt-4-0613")]
    Gpt40613,
    #[serde(rename = "gpt-3.5-turbo")]
    Gpt3Period5Turbo,
    #[serde(rename = "gpt-3.5-turbo-0125")]
    Gpt3Period5Turbo0125,
    #[serde(rename = "gpt-3.5-turbo-1106")]
    Gpt3Period5Turbo1106,
    #[serde(rename = "gpt-3.5-turbo-16k")]
    Gpt3Period5Turbo16k,
    #[serde(rename = "gpt-3.5-turbo-0613")]
    Gpt3Period5Turbo0613,
    #[serde(rename = "gpt-4.1-2025-04-14:westus")]
    Gpt4Period120250414ColonWestus,
    #[serde(rename = "gpt-4.1-2025-04-14:eastus2")]
    Gpt4Period120250414ColonEastus2,
    #[serde(rename = "gpt-4.1-2025-04-14:eastus")]
    Gpt4Period120250414ColonEastus,
    #[serde(rename = "gpt-4.1-2025-04-14:westus3")]
    Gpt4Period120250414ColonWestus3,
    #[serde(rename = "gpt-4.1-2025-04-14:northcentralus")]
    Gpt4Period120250414ColonNorthcentralus,
    #[serde(rename = "gpt-4.1-2025-04-14:southcentralus")]
    Gpt4Period120250414ColonSouthcentralus,
    #[serde(rename = "gpt-4.1-mini-2025-04-14:westus")]
    Gpt4Period1Mini20250414ColonWestus,
    #[serde(rename = "gpt-4.1-mini-2025-04-14:eastus2")]
    Gpt4Period1Mini20250414ColonEastus2,
    #[serde(rename = "gpt-4.1-mini-2025-04-14:eastus")]
    Gpt4Period1Mini20250414ColonEastus,
    #[serde(rename = "gpt-4.1-mini-2025-04-14:westus3")]
    Gpt4Period1Mini20250414ColonWestus3,
    #[serde(rename = "gpt-4.1-mini-2025-04-14:northcentralus")]
    Gpt4Period1Mini20250414ColonNorthcentralus,
    #[serde(rename = "gpt-4.1-mini-2025-04-14:southcentralus")]
    Gpt4Period1Mini20250414ColonSouthcentralus,
    #[serde(rename = "gpt-4.1-nano-2025-04-14:westus")]
    Gpt4Period1Nano20250414ColonWestus,
    #[serde(rename = "gpt-4.1-nano-2025-04-14:eastus2")]
    Gpt4Period1Nano20250414ColonEastus2,
    #[serde(rename = "gpt-4.1-nano-2025-04-14:westus3")]
    Gpt4Period1Nano20250414ColonWestus3,
    #[serde(rename = "gpt-4.1-nano-2025-04-14:northcentralus")]
    Gpt4Period1Nano20250414ColonNorthcentralus,
    #[serde(rename = "gpt-4.1-nano-2025-04-14:southcentralus")]
    Gpt4Period1Nano20250414ColonSouthcentralus,
    #[serde(rename = "gpt-4o-2024-11-20:swedencentral")]
    Gpt4o20241120ColonSwedencentral,
    #[serde(rename = "gpt-4o-2024-11-20:westus")]
    Gpt4o20241120ColonWestus,
    #[serde(rename = "gpt-4o-2024-11-20:eastus2")]
    Gpt4o20241120ColonEastus2,
    #[serde(rename = "gpt-4o-2024-11-20:eastus")]
    Gpt4o20241120ColonEastus,
    #[serde(rename = "gpt-4o-2024-11-20:westus3")]
    Gpt4o20241120ColonWestus3,
    #[serde(rename = "gpt-4o-2024-11-20:southcentralus")]
    Gpt4o20241120ColonSouthcentralus,
    #[serde(rename = "gpt-4o-2024-08-06:westus")]
    Gpt4o20240806ColonWestus,
    #[serde(rename = "gpt-4o-2024-08-06:westus3")]
    Gpt4o20240806ColonWestus3,
    #[serde(rename = "gpt-4o-2024-08-06:eastus")]
    Gpt4o20240806ColonEastus,
    #[serde(rename = "gpt-4o-2024-08-06:eastus2")]
    Gpt4o20240806ColonEastus2,
    #[serde(rename = "gpt-4o-2024-08-06:northcentralus")]
    Gpt4o20240806ColonNorthcentralus,
    #[serde(rename = "gpt-4o-2024-08-06:southcentralus")]
    Gpt4o20240806ColonSouthcentralus,
    #[serde(rename = "gpt-4o-mini-2024-07-18:westus")]
    Gpt4oMini20240718ColonWestus,
    #[serde(rename = "gpt-4o-mini-2024-07-18:westus3")]
    Gpt4oMini20240718ColonWestus3,
    #[serde(rename = "gpt-4o-mini-2024-07-18:eastus")]
    Gpt4oMini20240718ColonEastus,
    #[serde(rename = "gpt-4o-mini-2024-07-18:eastus2")]
    Gpt4oMini20240718ColonEastus2,
    #[serde(rename = "gpt-4o-mini-2024-07-18:northcentralus")]
    Gpt4oMini20240718ColonNorthcentralus,
    #[serde(rename = "gpt-4o-mini-2024-07-18:southcentralus")]
    Gpt4oMini20240718ColonSouthcentralus,
    #[serde(rename = "gpt-4o-2024-05-13:eastus2")]
    Gpt4o20240513ColonEastus2,
    #[serde(rename = "gpt-4o-2024-05-13:eastus")]
    Gpt4o20240513ColonEastus,
    #[serde(rename = "gpt-4o-2024-05-13:northcentralus")]
    Gpt4o20240513ColonNorthcentralus,
    #[serde(rename = "gpt-4o-2024-05-13:southcentralus")]
    Gpt4o20240513ColonSouthcentralus,
    #[serde(rename = "gpt-4o-2024-05-13:westus3")]
    Gpt4o20240513ColonWestus3,
    #[serde(rename = "gpt-4o-2024-05-13:westus")]
    Gpt4o20240513ColonWestus,
    #[serde(rename = "gpt-4-turbo-2024-04-09:eastus2")]
    Gpt4Turbo20240409ColonEastus2,
    #[serde(rename = "gpt-4-0125-preview:eastus")]
    Gpt40125PreviewColonEastus,
    #[serde(rename = "gpt-4-0125-preview:northcentralus")]
    Gpt40125PreviewColonNorthcentralus,
    #[serde(rename = "gpt-4-0125-preview:southcentralus")]
    Gpt40125PreviewColonSouthcentralus,
    #[serde(rename = "gpt-4-1106-preview:australia")]
    Gpt41106PreviewColonAustralia,
    #[serde(rename = "gpt-4-1106-preview:canadaeast")]
    Gpt41106PreviewColonCanadaeast,
    #[serde(rename = "gpt-4-1106-preview:france")]
    Gpt41106PreviewColonFrance,
    #[serde(rename = "gpt-4-1106-preview:india")]
    Gpt41106PreviewColonIndia,
    #[serde(rename = "gpt-4-1106-preview:norway")]
    Gpt41106PreviewColonNorway,
    #[serde(rename = "gpt-4-1106-preview:swedencentral")]
    Gpt41106PreviewColonSwedencentral,
    #[serde(rename = "gpt-4-1106-preview:uk")]
    Gpt41106PreviewColonUk,
    #[serde(rename = "gpt-4-1106-preview:westus")]
    Gpt41106PreviewColonWestus,
    #[serde(rename = "gpt-4-1106-preview:westus3")]
    Gpt41106PreviewColonWestus3,
    #[serde(rename = "gpt-4-0613:canadaeast")]
    Gpt40613ColonCanadaeast,
    #[serde(rename = "gpt-3.5-turbo-0125:canadaeast")]
    Gpt3Period5Turbo0125ColonCanadaeast,
    #[serde(rename = "gpt-3.5-turbo-0125:northcentralus")]
    Gpt3Period5Turbo0125ColonNorthcentralus,
    #[serde(rename = "gpt-3.5-turbo-0125:southcentralus")]
    Gpt3Period5Turbo0125ColonSouthcentralus,
    #[serde(rename = "gpt-3.5-turbo-1106:canadaeast")]
    Gpt3Period5Turbo1106ColonCanadaeast,
    #[serde(rename = "gpt-3.5-turbo-1106:westus")]
    Gpt3Period5Turbo1106ColonWestus,
}

impl Default for FallbackModelsTrue {
    fn default() -> FallbackModelsTrue {
        Self::Gpt4Period120250414
    }
}
/// Azure OpenAI doesn't support `maxLength` right now https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/structured-outputs?tabs=python-secure%2Cdotnet-entra-id&pivots=programming-language-csharp#unsupported-type-specific-keywords. Need to strip.  - `strip-parameters-with-unsupported-validation` will strip parameters with unsupported validation. - `strip-unsupported-validation` will keep the parameters but strip unsupported validation.  @default `strip-unsupported-validation`
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ToolStrictCompatibilityModeTrue {
    #[serde(rename = "strip-parameters-with-unsupported-validation")]
    StripParametersWithUnsupportedValidation,
    #[serde(rename = "strip-unsupported-validation")]
    StripUnsupportedValidation,
}

impl Default for ToolStrictCompatibilityModeTrue {
    fn default() -> ToolStrictCompatibilityModeTrue {
        Self::StripParametersWithUnsupportedValidation
    }
}