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