vapi_client/models/
workflow_anthropic_model.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 WorkflowAnthropicModel {
16    /// This is the provider of the model (`anthropic`).
17    #[serde(rename = "provider")]
18    pub provider: ProviderTrue,
19    /// This is the specific model that will be used.
20    #[serde(rename = "model")]
21    pub model: ModelTrue,
22    /// 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`.
23    #[serde(rename = "thinking", skip_serializing_if = "Option::is_none")]
24    pub thinking: Option<models::AnthropicThinkingConfig>,
25    /// This is the temperature of the model.
26    #[serde(rename = "temperature", skip_serializing_if = "Option::is_none")]
27    pub temperature: Option<f64>,
28    /// This is the max tokens of the model.
29    #[serde(rename = "maxTokens", skip_serializing_if = "Option::is_none")]
30    pub max_tokens: Option<f64>,
31}
32
33impl WorkflowAnthropicModel {
34    pub fn new(provider: ProviderTrue, model: ModelTrue) -> WorkflowAnthropicModel {
35        WorkflowAnthropicModel {
36            provider,
37            model,
38            thinking: None,
39            temperature: None,
40            max_tokens: None,
41        }
42    }
43}
44/// This is the provider of the model (`anthropic`).
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum ProviderTrue {
47    #[serde(rename = "anthropic")]
48    Anthropic,
49}
50
51impl Default for ProviderTrue {
52    fn default() -> ProviderTrue {
53        Self::Anthropic
54    }
55}
56/// This is the specific model that will be used.
57#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
58pub enum ModelTrue {
59    #[serde(rename = "claude-3-opus-20240229")]
60    Claude3Opus20240229,
61    #[serde(rename = "claude-3-sonnet-20240229")]
62    Claude3Sonnet20240229,
63    #[serde(rename = "claude-3-haiku-20240307")]
64    Claude3Haiku20240307,
65    #[serde(rename = "claude-3-5-sonnet-20240620")]
66    Claude35Sonnet20240620,
67    #[serde(rename = "claude-3-5-sonnet-20241022")]
68    Claude35Sonnet20241022,
69    #[serde(rename = "claude-3-5-haiku-20241022")]
70    Claude35Haiku20241022,
71    #[serde(rename = "claude-3-7-sonnet-20250219")]
72    Claude37Sonnet20250219,
73    #[serde(rename = "claude-opus-4-20250514")]
74    ClaudeOpus420250514,
75    #[serde(rename = "claude-sonnet-4-20250514")]
76    ClaudeSonnet420250514,
77}
78
79impl Default for ModelTrue {
80    fn default() -> ModelTrue {
81        Self::Claude3Opus20240229
82    }
83}