pub struct TruncationObject {
pub type: TruncationObjectType,
pub last_messages: Option<i64>,
}
Expand description
Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
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<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§const fn clone_from(&mut self, source: &Self)
const 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