vapi_client/models/
artifact.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};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Artifact {
17    /// These are the messages that were spoken during the call.
18    #[serde(rename = "messages", skip_serializing_if = "Option::is_none")]
19    pub messages: Option<Vec<models::ArtifactMessagesInner>>,
20    /// These are the messages that were spoken during the call, formatted for OpenAI.
21    #[serde(
22        rename = "messagesOpenAIFormatted",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub messages_open_ai_formatted: Option<Vec<models::OpenAiMessage>>,
26    /// This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
27    #[serde(rename = "recordingUrl", skip_serializing_if = "Option::is_none")]
28    pub recording_url: Option<String>,
29    /// This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
30    #[serde(rename = "stereoRecordingUrl", skip_serializing_if = "Option::is_none")]
31    pub stereo_recording_url: Option<String>,
32    /// This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`.
33    #[serde(rename = "videoRecordingUrl", skip_serializing_if = "Option::is_none")]
34    pub video_recording_url: Option<String>,
35    /// This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps.
36    #[serde(
37        rename = "videoRecordingStartDelaySeconds",
38        skip_serializing_if = "Option::is_none"
39    )]
40    pub video_recording_start_delay_seconds: Option<f64>,
41    /// This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience.
42    #[serde(rename = "transcript", skip_serializing_if = "Option::is_none")]
43    pub transcript: Option<String>,
44    /// This is the packet capture url for the call. This is only available for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`.
45    #[serde(rename = "pcapUrl", skip_serializing_if = "Option::is_none")]
46    pub pcap_url: Option<String>,
47}
48
49impl Artifact {
50    pub fn new() -> Artifact {
51        Artifact {
52            messages: None,
53            messages_open_ai_formatted: None,
54            recording_url: None,
55            stereo_recording_url: None,
56            video_recording_url: None,
57            video_recording_start_delay_seconds: None,
58            transcript: None,
59            pcap_url: None,
60        }
61    }
62}