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
/*
* 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 ClientInboundMessageAddMessage {
/// This is the type of the message. Send \"add-message\" message to add a message to the conversation history.
#[serde(rename = "type")]
pub r#type: TypeTrue,
/// This is the message to add to the conversation.
#[serde(rename = "message")]
pub message: models::OpenAiMessage,
/// This is the flag to trigger a response, or to insert the message into the conversation history silently. Defaults to `true`. Usage: - Use `true` to trigger a response. - Use `false` to insert the message into the conversation history silently. @default true
#[serde(
rename = "triggerResponseEnabled",
skip_serializing_if = "Option::is_none"
)]
pub trigger_response_enabled: Option<bool>,
}
impl ClientInboundMessageAddMessage {
pub fn new(r#type: TypeTrue, message: models::OpenAiMessage) -> ClientInboundMessageAddMessage {
ClientInboundMessageAddMessage {
r#type,
message,
trigger_response_enabled: None,
}
}
}
/// This is the type of the message. Send \"add-message\" message to add a message to the conversation history.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TypeTrue {
#[serde(rename = "add-message")]
AddMessage,
}
impl Default for TypeTrue {
fn default() -> TypeTrue {
Self::AddMessage
}
}