vapi_client/models/
system_message.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};
12use utoipa::ToSchema;
13
14
15use crate::models;
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, ToSchema)]
18pub struct SystemMessage {
19    /// The role of the system in the conversation.
20    #[serde(rename = "role")]
21    pub role: String,
22    /// The message content from the system.
23    #[serde(rename = "message")]
24    pub message: String,
25    /// The timestamp when the message was sent.
26    #[serde(rename = "time")]
27    pub time: f64,
28    /// The number of seconds from the start of the conversation.
29    #[serde(rename = "secondsFromStart")]
30    pub seconds_from_start: f64,
31}
32
33impl SystemMessage {
34    pub fn new(role: String, message: String, time: f64, seconds_from_start: f64) -> SystemMessage {
35        SystemMessage {
36            role,
37            message,
38            time,
39            seconds_from_start,
40        }
41    }
42}