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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WorkflowAnthropicModel {
    /// This is the provider of the model (`anthropic`).
    #[serde(rename = "provider")]
    pub provider: ProviderTrue,
    /// This is the specific model that will be used.
    #[serde(rename = "model")]
    pub model: ModelTrue,
    /// This is the optional configuration for Anthropic's thinking feature.  - Only applicable for `claude-3-7-sonnet-20250219` model. - If provided, `maxTokens` must be greater than `thinking.budgetTokens`.
    #[serde(rename = "thinking", skip_serializing_if = "Option::is_none")]
    pub thinking: Option<models::AnthropicThinkingConfig>,
    /// This is the temperature of the model.
    #[serde(rename = "temperature", skip_serializing_if = "Option::is_none")]
    pub temperature: Option<f64>,
    /// This is the max tokens of the model.
    #[serde(rename = "maxTokens", skip_serializing_if = "Option::is_none")]
    pub max_tokens: Option<f64>,
}

impl WorkflowAnthropicModel {
    pub fn new(provider: ProviderTrue, model: ModelTrue) -> WorkflowAnthropicModel {
        WorkflowAnthropicModel {
            provider,
            model,
            thinking: None,
            temperature: None,
            max_tokens: None,
        }
    }
}
/// This is the provider of the model (`anthropic`).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ProviderTrue {
    #[serde(rename = "anthropic")]
    Anthropic,
}

impl Default for ProviderTrue {
    fn default() -> ProviderTrue {
        Self::Anthropic
    }
}
/// This is the specific model that will be used.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ModelTrue {
    #[serde(rename = "claude-3-opus-20240229")]
    Claude3Opus20240229,
    #[serde(rename = "claude-3-sonnet-20240229")]
    Claude3Sonnet20240229,
    #[serde(rename = "claude-3-haiku-20240307")]
    Claude3Haiku20240307,
    #[serde(rename = "claude-3-5-sonnet-20240620")]
    Claude35Sonnet20240620,
    #[serde(rename = "claude-3-5-sonnet-20241022")]
    Claude35Sonnet20241022,
    #[serde(rename = "claude-3-5-haiku-20241022")]
    Claude35Haiku20241022,
    #[serde(rename = "claude-3-7-sonnet-20250219")]
    Claude37Sonnet20250219,
    #[serde(rename = "claude-opus-4-20250514")]
    ClaudeOpus420250514,
    #[serde(rename = "claude-sonnet-4-20250514")]
    ClaudeSonnet420250514,
}

impl Default for ModelTrue {
    fn default() -> ModelTrue {
        Self::Claude3Opus20240229
    }
}