vapi_client/models/client_message_transfer_update_destination.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/// ClientMessageTransferUpdateDestination : This is the destination of the transfer.
15/// This is the destination of the transfer.
16#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
17#[serde(untagged)]
18pub enum ClientMessageTransferUpdateDestination {
19 TransferDestinationAssistant(Box<models::TransferDestinationAssistant>),
20 TransferDestinationStep(Box<models::TransferDestinationStep>),
21 TransferDestinationNumber(Box<models::TransferDestinationNumber>),
22 TransferDestinationSip(Box<models::TransferDestinationSip>),
23}
24
25impl Default for ClientMessageTransferUpdateDestination {
26 fn default() -> Self {
27 Self::TransferDestinationAssistant(Default::default())
28 }
29}
30///
31#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
32pub enum Type {
33 #[serde(rename = "assistant")]
34 Assistant,
35 #[serde(rename = "step")]
36 Step,
37 #[serde(rename = "number")]
38 Number,
39 #[serde(rename = "sip")]
40 Sip,
41}
42
43impl Default for Type {
44 fn default() -> Type {
45 Self::Assistant
46 }
47}
48/// This is the mode to use for the transfer. Defaults to `rolling-history`. - `rolling-history`: This is the default mode. It keeps the entire conversation history and appends the new assistant's system message on transfer. Example: Pre-transfer: system: assistant1 system message assistant: assistant1 first message user: hey, good morning assistant: how can i help? user: i need help with my account assistant: (destination.message) Post-transfer: system: assistant1 system message assistant: assistant1 first message user: hey, good morning assistant: how can i help? user: i need help with my account assistant: (destination.message) system: assistant2 system message assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`) - `swap-system-message-in-history`: This replaces the original system message with the new assistant's system message on transfer. Example: Pre-transfer: system: assistant1 system message assistant: assistant1 first message user: hey, good morning assistant: how can i help? user: i need help with my account assistant: (destination.message) Post-transfer: system: assistant2 system message assistant: assistant1 first message user: hey, good morning assistant: how can i help? user: i need help with my account assistant: (destination.message) assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`) - `delete-history`: This deletes the entire conversation history on transfer. Example: Pre-transfer: system: assistant1 system message assistant: assistant1 first message user: hey, good morning assistant: how can i help? user: i need help with my account assistant: (destination.message) Post-transfer: system: assistant2 system message assistant: assistant2 first message user: Yes, please assistant: how can i help? user: i need help with my account - `swap-system-message-in-history-and-remove-transfer-tool-messages`: This replaces the original system message with the new assistant's system message on transfer and removes transfer tool messages from conversation history sent to the LLM. Example: Pre-transfer: system: assistant1 system message assistant: assistant1 first message user: hey, good morning assistant: how can i help? user: i need help with my account transfer-tool transfer-tool-result assistant: (destination.message) Post-transfer: system: assistant2 system message assistant: assistant1 first message user: hey, good morning assistant: how can i help? user: i need help with my account assistant: (destination.message) assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`) @default 'rolling-history'
49#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
50pub enum TransferMode {
51 #[serde(rename = "rolling-history")]
52 RollingHistory,
53 #[serde(rename = "swap-system-message-in-history")]
54 SwapSystemMessageInHistory,
55 #[serde(rename = "swap-system-message-in-history-and-remove-transfer-tool-messages")]
56 SwapSystemMessageInHistoryAndRemoveTransferToolMessages,
57 #[serde(rename = "delete-history")]
58 DeleteHistory,
59}
60
61impl Default for TransferMode {
62 fn default() -> TransferMode {
63 Self::RollingHistory
64 }
65}
66