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(
21        rename = "messagesOpenAIFormatted",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub messages_open_ai_formatted: Option<Vec<models::OpenAiMessage>>,
25    /// This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
26    #[serde(rename = "recordingUrl", skip_serializing_if = "Option::is_none")]
27    pub recording_url: Option<String>,
28    /// This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
29    #[serde(rename = "stereoRecordingUrl", skip_serializing_if = "Option::is_none")]
30    pub stereo_recording_url: Option<String>,
31    /// This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`.
32    #[serde(rename = "videoRecordingUrl", skip_serializing_if = "Option::is_none")]
33    pub video_recording_url: Option<String>,
34    /// 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.
35    #[serde(
36        rename = "videoRecordingStartDelaySeconds",
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub video_recording_start_delay_seconds: Option<f64>,
40    /// This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
41    #[serde(rename = "recording", skip_serializing_if = "Option::is_none")]
42    pub recording: Option<models::Recording>,
43    /// This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience.
44    #[serde(rename = "transcript", skip_serializing_if = "Option::is_none")]
45    pub transcript: Option<String>,
46    /// 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`.
47    #[serde(rename = "pcapUrl", skip_serializing_if = "Option::is_none")]
48    pub pcap_url: Option<String>,
49    /// This is the history of workflow nodes that were executed during the call.
50    #[serde(rename = "nodes", skip_serializing_if = "Option::is_none")]
51    pub nodes: Option<Vec<models::NodeArtifact>>,
52    /// This is the state of variables at the end of the workflow execution.
53    #[serde(rename = "variables", skip_serializing_if = "Option::is_none")]
54    pub variables: Option<serde_json::Value>,
55}
56
57impl Artifact {
58    pub fn new() -> Artifact {
59        Artifact {
60            messages: None,
61            messages_open_ai_formatted: None,
62            recording_url: None,
63            stereo_recording_url: None,
64            video_recording_url: None,
65            video_recording_start_delay_seconds: None,
66            recording: None,
67            transcript: None,
68            pcap_url: None,
69            nodes: None,
70            variables: None,
71        }
72    }
73}