pub enum Truncation {
Auto,
Disabled,
}Expand description
The truncation strategy to use when the input exceeds the model’s context window.
Variants§
Auto
Truncate items from the beginning of the conversation to fit the context window.
Disabled
Fail the request with a 400 error instead (the default; the only behavior supported by DeepSeek).
Trait Implementations§
Source§impl Clone for Truncation
impl Clone for Truncation
impl Copy for Truncation
Source§impl Debug for Truncation
impl Debug for Truncation
Source§impl<'de> Deserialize<'de> for Truncation
impl<'de> Deserialize<'de> for Truncation
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
impl Eq for Truncation
Source§impl PartialEq for Truncation
impl PartialEq for Truncation
Source§impl Serialize for Truncation
impl Serialize for Truncation
impl StructuralPartialEq for Truncation
Auto Trait Implementations§
impl Freeze for Truncation
impl RefUnwindSafe for Truncation
impl Send for Truncation
impl Sync for Truncation
impl Unpin for Truncation
impl UnsafeUnpin for Truncation
impl UnwindSafe for Truncation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.