pub struct ChatTruncatedAction {
pub turn_id: Option<String>,
}Expand description
Truncates a session’s history. If turnId is provided, all turns after that
turn are removed and the specified turn is kept. If turnId is omitted, all
turns are removed.
If there is an active turn it is silently dropped and the chat status
returns to idle.
Common use-case: truncate old data then dispatch a new
chat/turnStarted with an edited message.
Fields§
§turn_id: Option<String>Keep turns up to and including this turn. Omit to clear all turns.
Trait Implementations§
Source§impl Clone for ChatTruncatedAction
impl Clone for ChatTruncatedAction
Source§fn clone(&self) -> ChatTruncatedAction
fn clone(&self) -> ChatTruncatedAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChatTruncatedAction
impl Debug for ChatTruncatedAction
Source§impl Default for ChatTruncatedAction
impl Default for ChatTruncatedAction
Source§fn default() -> ChatTruncatedAction
fn default() -> ChatTruncatedAction
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ChatTruncatedAction
impl<'de> Deserialize<'de> for ChatTruncatedAction
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ChatTruncatedAction
impl PartialEq for ChatTruncatedAction
Source§fn eq(&self, other: &ChatTruncatedAction) -> bool
fn eq(&self, other: &ChatTruncatedAction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ChatTruncatedAction
impl Serialize for ChatTruncatedAction
impl StructuralPartialEq for ChatTruncatedAction
Auto Trait Implementations§
impl Freeze for ChatTruncatedAction
impl RefUnwindSafe for ChatTruncatedAction
impl Send for ChatTruncatedAction
impl Sync for ChatTruncatedAction
impl Unpin for ChatTruncatedAction
impl UnsafeUnpin for ChatTruncatedAction
impl UnwindSafe for ChatTruncatedAction
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
Mutably borrows from an owned value. Read more