pub struct TruncationObject {
    pub type: Type,
    pub last_messages: Option<i64>,
}Expand description
Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run.
Fields§
§type: TypeThe truncation strategy to use for the thread. The default is auto. If set to last_messages, the thread will be truncated to the n most recent messages in the thread. When set to auto, messages in the middle of the thread will be dropped to fit the context length of the model, max_prompt_tokens.
last_messages: Option<i64>The number of most recent messages from the thread when constructing the context for the run.
Implementations§
Trait Implementations§
Source§impl Clone for TruncationObject
 
impl Clone for TruncationObject
Source§fn clone(&self) -> TruncationObject
 
fn clone(&self) -> TruncationObject
Returns a duplicate of the value. Read more
1.0.0 · 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 TruncationObject
 
impl Debug for TruncationObject
Source§impl<'de> Deserialize<'de> for TruncationObject
 
impl<'de> Deserialize<'de> for TruncationObject
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 TruncationObject
 
impl PartialEq for TruncationObject
Source§impl Serialize for TruncationObject
 
impl Serialize for TruncationObject
impl Copy for TruncationObject
impl StructuralPartialEq for TruncationObject
Auto Trait Implementations§
impl Freeze for TruncationObject
impl RefUnwindSafe for TruncationObject
impl Send for TruncationObject
impl Sync for TruncationObject
impl Unpin for TruncationObject
impl UnwindSafe for TruncationObject
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