vapi_client/models/
artifact.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 Artifact {
16    /// These are the messages that were spoken during the call.
17    #[serde(rename = "messages", skip_serializing_if = "Option::is_none")]
18    pub messages: Option<Vec<models::ArtifactMessagesInner>>,
19    /// These are the messages that were spoken during the call, formatted for OpenAI.
20    #[serde(rename = "messagesOpenAIFormatted", skip_serializing_if = "Option::is_none")]
21    pub messages_open_ai_formatted: Option<Vec<models::OpenAiMessage>>,
22    /// This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
23    #[serde(rename = "recordingUrl", skip_serializing_if = "Option::is_none")]
24    pub recording_url: Option<String>,
25    /// This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
26    #[serde(rename = "stereoRecordingUrl", skip_serializing_if = "Option::is_none")]
27    pub stereo_recording_url: Option<String>,
28    /// This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`.
29    #[serde(rename = "videoRecordingUrl", skip_serializing_if = "Option::is_none")]
30    pub video_recording_url: Option<String>,
31    /// 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.
32    #[serde(rename = "videoRecordingStartDelaySeconds", skip_serializing_if = "Option::is_none")]
33    pub video_recording_start_delay_seconds: Option<f64>,
34    /// This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience.
35    #[serde(rename = "transcript", skip_serializing_if = "Option::is_none")]
36    pub transcript: Option<String>,
37    /// 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`.
38    #[serde(rename = "pcapUrl", skip_serializing_if = "Option::is_none")]
39    pub pcap_url: Option<String>,
40}
41
42impl Artifact {
43    pub fn new() -> Artifact {
44        Artifact {
45            messages: None,
46            messages_open_ai_formatted: None,
47            recording_url: None,
48            stereo_recording_url: None,
49            video_recording_url: None,
50            video_recording_start_delay_seconds: None,
51            transcript: None,
52            pcap_url: None,
53        }
54    }
55}
56