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