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