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
/*
* 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 SystemMessage {
/// The role of the system in the conversation.
#[serde(rename = "role")]
pub role: String,
/// The message content from the system.
#[serde(rename = "message")]
pub message: String,
/// The timestamp when the message was sent.
#[serde(rename = "time")]
pub time: f64,
/// The number of seconds from the start of the conversation.
#[serde(rename = "secondsFromStart")]
pub seconds_from_start: f64,
}
impl SystemMessage {
pub fn new(role: String, message: String, time: f64, seconds_from_start: f64) -> SystemMessage {
SystemMessage {
role,
message,
time,
seconds_from_start,
}
}
}