pub struct TruncationObject {
pub type: TruncationObjectType,
pub last_messages: Option<u32>,
}
Expand description
Thread Truncation Controls
Fields§
§type: TruncationObjectType
The 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<u32>
The number of most recent messages from the thread when constructing the context for the run.
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 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