1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* Vapi API
*
* Voice AI for developers.
*
* The version of the OpenAPI document: 1.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Artifact {
/// These are the messages that were spoken during the call.
#[serde(rename = "messages", skip_serializing_if = "Option::is_none")]
pub messages: Option<Vec<models::ArtifactMessagesInner>>,
/// These are the messages that were spoken during the call, formatted for OpenAI.
#[serde(
rename = "messagesOpenAIFormatted",
skip_serializing_if = "Option::is_none"
)]
pub messages_open_ai_formatted: Option<Vec<models::OpenAiMessage>>,
/// This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
#[serde(rename = "recordingUrl", skip_serializing_if = "Option::is_none")]
pub recording_url: Option<String>,
/// This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
#[serde(rename = "stereoRecordingUrl", skip_serializing_if = "Option::is_none")]
pub stereo_recording_url: Option<String>,
/// This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`.
#[serde(rename = "videoRecordingUrl", skip_serializing_if = "Option::is_none")]
pub video_recording_url: Option<String>,
/// 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.
#[serde(
rename = "videoRecordingStartDelaySeconds",
skip_serializing_if = "Option::is_none"
)]
pub video_recording_start_delay_seconds: Option<f64>,
/// This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
#[serde(rename = "recording", skip_serializing_if = "Option::is_none")]
pub recording: Option<models::Recording>,
/// This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience.
#[serde(rename = "transcript", skip_serializing_if = "Option::is_none")]
pub transcript: Option<String>,
/// 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`.
#[serde(rename = "pcapUrl", skip_serializing_if = "Option::is_none")]
pub pcap_url: Option<String>,
/// This is the history of workflow nodes that were executed during the call.
#[serde(rename = "nodes", skip_serializing_if = "Option::is_none")]
pub nodes: Option<Vec<models::NodeArtifact>>,
/// This is the state of variables at the end of the workflow execution.
#[serde(rename = "variables", skip_serializing_if = "Option::is_none")]
pub variables: Option<serde_json::Value>,
}
impl Artifact {
pub fn new() -> Artifact {
Artifact {
messages: None,
messages_open_ai_formatted: None,
recording_url: None,
stereo_recording_url: None,
video_recording_url: None,
video_recording_start_delay_seconds: None,
recording: None,
transcript: None,
pcap_url: None,
nodes: None,
variables: None,
}
}
}