pub enum TransferMode {
RollingHistory,
SwapSystemMessageInHistory,
SwapSystemMessageInHistoryAndRemoveTransferToolMessages,
DeleteHistory,
}Expand description
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’
Variants§
RollingHistory
SwapSystemMessageInHistory
SwapSystemMessageInHistoryAndRemoveTransferToolMessages
DeleteHistory
Trait Implementations§
Source§impl Clone for TransferMode
impl Clone for TransferMode
Source§fn clone(&self) -> TransferMode
fn clone(&self) -> TransferMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransferMode
impl Debug for TransferMode
Source§impl Default for TransferMode
impl Default for TransferMode
Source§fn default() -> TransferMode
fn default() -> TransferMode
Source§impl<'de> Deserialize<'de> for TransferMode
impl<'de> Deserialize<'de> for TransferMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for TransferMode
impl Hash for TransferMode
Source§impl Ord for TransferMode
impl Ord for TransferMode
Source§fn cmp(&self, other: &TransferMode) -> Ordering
fn cmp(&self, other: &TransferMode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TransferMode
impl PartialEq for TransferMode
Source§impl PartialOrd for TransferMode
impl PartialOrd for TransferMode
Source§impl Serialize for TransferMode
impl Serialize for TransferMode
impl Copy for TransferMode
impl Eq for TransferMode
impl StructuralPartialEq for TransferMode
Auto Trait Implementations§
impl Freeze for TransferMode
impl RefUnwindSafe for TransferMode
impl Send for TransferMode
impl Sync for TransferMode
impl Unpin for TransferMode
impl UnwindSafe for TransferMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.