vapi_client/models/
analysis_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 AnalysisCostBreakdown {
16    /// This is the cost to summarize the call.
17    #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
18    pub summary: Option<f64>,
19    /// This is the number of prompt tokens used to summarize the call.
20    #[serde(
21        rename = "summaryPromptTokens",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub summary_prompt_tokens: Option<f64>,
25    /// This is the number of completion tokens used to summarize the call.
26    #[serde(
27        rename = "summaryCompletionTokens",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub summary_completion_tokens: Option<f64>,
31    /// This is the cost to extract structured data from the call.
32    #[serde(rename = "structuredData", skip_serializing_if = "Option::is_none")]
33    pub structured_data: Option<f64>,
34    /// This is the number of prompt tokens used to extract structured data from the call.
35    #[serde(
36        rename = "structuredDataPromptTokens",
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub structured_data_prompt_tokens: Option<f64>,
40    /// This is the number of completion tokens used to extract structured data from the call.
41    #[serde(
42        rename = "structuredDataCompletionTokens",
43        skip_serializing_if = "Option::is_none"
44    )]
45    pub structured_data_completion_tokens: Option<f64>,
46    /// This is the cost to evaluate if the call was successful.
47    #[serde(rename = "successEvaluation", skip_serializing_if = "Option::is_none")]
48    pub success_evaluation: Option<f64>,
49    /// This is the number of prompt tokens used to evaluate if the call was successful.
50    #[serde(
51        rename = "successEvaluationPromptTokens",
52        skip_serializing_if = "Option::is_none"
53    )]
54    pub success_evaluation_prompt_tokens: Option<f64>,
55    /// This is the number of completion tokens used to evaluate if the call was successful.
56    #[serde(
57        rename = "successEvaluationCompletionTokens",
58        skip_serializing_if = "Option::is_none"
59    )]
60    pub success_evaluation_completion_tokens: Option<f64>,
61}
62
63impl AnalysisCostBreakdown {
64    pub fn new() -> AnalysisCostBreakdown {
65        AnalysisCostBreakdown {
66            summary: None,
67            summary_prompt_tokens: None,
68            summary_completion_tokens: None,
69            structured_data: None,
70            structured_data_prompt_tokens: None,
71            structured_data_completion_tokens: None,
72            success_evaluation: None,
73            success_evaluation_prompt_tokens: None,
74            success_evaluation_completion_tokens: None,
75        }
76    }
77}