vapi_client/models/
cost_breakdown.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 CostBreakdown {
16    /// This is the cost of the transport provider, like Twilio or Vonage.
17    #[serde(rename = "transport", skip_serializing_if = "Option::is_none")]
18    pub transport: Option<f64>,
19    /// This is the cost of the speech-to-text service.
20    #[serde(rename = "stt", skip_serializing_if = "Option::is_none")]
21    pub stt: Option<f64>,
22    /// This is the cost of the language model.
23    #[serde(rename = "llm", skip_serializing_if = "Option::is_none")]
24    pub llm: Option<f64>,
25    /// This is the cost of the text-to-speech service.
26    #[serde(rename = "tts", skip_serializing_if = "Option::is_none")]
27    pub tts: Option<f64>,
28    /// This is the cost of Vapi.
29    #[serde(rename = "vapi", skip_serializing_if = "Option::is_none")]
30    pub vapi: Option<f64>,
31    /// This is the cost of chat interactions.
32    #[serde(rename = "chat", skip_serializing_if = "Option::is_none")]
33    pub chat: Option<f64>,
34    /// This is the total cost of the call.
35    #[serde(rename = "total", skip_serializing_if = "Option::is_none")]
36    pub total: Option<f64>,
37    /// This is the LLM prompt tokens used for the call.
38    #[serde(rename = "llmPromptTokens", skip_serializing_if = "Option::is_none")]
39    pub llm_prompt_tokens: Option<f64>,
40    /// This is the LLM completion tokens used for the call.
41    #[serde(
42        rename = "llmCompletionTokens",
43        skip_serializing_if = "Option::is_none"
44    )]
45    pub llm_completion_tokens: Option<f64>,
46    /// This is the TTS characters used for the call.
47    #[serde(rename = "ttsCharacters", skip_serializing_if = "Option::is_none")]
48    pub tts_characters: Option<f64>,
49    /// This is the cost of the analysis.
50    #[serde(
51        rename = "analysisCostBreakdown",
52        skip_serializing_if = "Option::is_none"
53    )]
54    pub analysis_cost_breakdown: Option<models::AnalysisCostBreakdown>,
55}
56
57impl CostBreakdown {
58    pub fn new() -> CostBreakdown {
59        CostBreakdown {
60            transport: None,
61            stt: None,
62            llm: None,
63            tts: None,
64            vapi: None,
65            chat: None,
66            total: None,
67            llm_prompt_tokens: None,
68            llm_completion_tokens: None,
69            tts_characters: None,
70            analysis_cost_breakdown: None,
71        }
72    }
73}