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(models::TransferDestinationAssistant),
20    TransferDestinationNumber(models::TransferDestinationNumber),
21    TransferDestinationSip(models::TransferDestinationSip),
22}
23
24impl Default for ClientMessageTransferUpdateDestination {
25    fn default() -> Self {
26        Self::TransferDestinationAssistant(Default::default())
27    }
28}
29///
30#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum TypeTrue {
32    #[serde(rename = "assistant")]
33    Assistant,
34    #[serde(rename = "number")]
35    Number,
36    #[serde(rename = "sip")]
37    Sip,
38}
39
40impl Default for TypeTrue {
41    fn default() -> TypeTrue {
42        Self::Assistant
43    }
44}
45/// 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'
46#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
47pub enum TransferModeTrue {
48    #[serde(rename = "rolling-history")]
49    RollingHistory,
50    #[serde(rename = "swap-system-message-in-history")]
51    SwapSystemMessageInHistory,
52    #[serde(rename = "swap-system-message-in-history-and-remove-transfer-tool-messages")]
53    SwapSystemMessageInHistoryAndRemoveTransferToolMessages,
54    #[serde(rename = "delete-history")]
55    DeleteHistory,
56}
57
58impl Default for TransferModeTrue {
59    fn default() -> TransferModeTrue {
60        Self::RollingHistory
61    }
62}