pub enum TruncationSide {
Left,
Right,
Unknown(String),
}Expand description
Which end of an over-long prompt truncate_prompt_tokens removes.
Variants§
Left
Drop tokens from the beginning, keeping the most recent context.
Right
Drop tokens from the end, keeping the earliest context.
Unknown(String)
Any other value emitted by the backend, preserved verbatim.
Implementations§
Trait Implementations§
Source§impl AsRef<str> for TruncationSide
impl AsRef<str> for TruncationSide
Source§impl Clone for TruncationSide
impl Clone for TruncationSide
Source§impl Debug for TruncationSide
impl Debug for TruncationSide
Source§impl<'de> Deserialize<'de> for TruncationSide
impl<'de> Deserialize<'de> for TruncationSide
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 Display for TruncationSide
impl Display for TruncationSide
impl Eq for TruncationSide
Source§impl Hash for TruncationSide
impl Hash for TruncationSide
Source§impl PartialEq for TruncationSide
impl PartialEq for TruncationSide
Source§impl Serialize for TruncationSide
impl Serialize for TruncationSide
impl StructuralPartialEq for TruncationSide
Auto Trait Implementations§
impl Freeze for TruncationSide
impl RefUnwindSafe for TruncationSide
impl Send for TruncationSide
impl Sync for TruncationSide
impl Unpin for TruncationSide
impl UnsafeUnpin for TruncationSide
impl UnwindSafe for TruncationSide
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.