vapi_client/models/
summary_plan.rs

1/*
2 * Vapi API
3 *
4 * API for building voice assistants
5 *
6 * The version of the OpenAPI document: 1.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12use utoipa::ToSchema;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
18pub struct SummaryPlan {
19    /// These are the messages used to generate the summary.  @default: ``` [   {     \"role\": \"system\",     \"content\": \"You are an expert note-taker. You will be given a transcript of a call. Summarize the call in 2-3 sentences. DO NOT return anything except the summary.\"   },   {     \"role\": \"user\",     \"content\": \"Here is the transcript:\\n\\n{{transcript}}\\n\\n\"   } ]```  You can customize by providing any messages you want.  Here are the template variables available: - {{transcript}}: The transcript of the call from `call.artifact.transcript`- {{systemPrompt}}: The system prompt of the call from `assistant.model.messages[type=system].content`
20    #[serde(rename = "messages", skip_serializing_if = "Option::is_none")]
21    pub messages: Option<Vec<serde_json::Value>>,
22    /// This determines whether a summary is generated and stored in `call.analysis.summary`. Defaults to true.  Usage: - If you want to disable the summary, set this to false.  @default true
23    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
24    pub enabled: Option<bool>,
25    /// This is how long the request is tried before giving up. When request times out, `call.analysis.summary` will be empty.  Usage: - To guarantee the summary is generated, set this value high. Note, this will delay the end of call report in cases where model is slow to respond.  @default 5 seconds
26    #[serde(rename = "timeoutSeconds", skip_serializing_if = "Option::is_none")]
27    pub timeout_seconds: Option<f64>,
28}
29
30impl SummaryPlan {
31    pub fn new() -> SummaryPlan {
32        SummaryPlan {
33            messages: None,
34            enabled: None,
35            timeout_seconds: None,
36        }
37    }
38}