pub enum Truncation {
Auto,
Disabled,
}
Expand description
The truncation strategy to use for the model response.
auto
: If the context of this response and previous ones exceeds the model’s context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation.disabled
(default): If a model response will exceed the context window size for a model, the request will fail with a 400 error.
Variants§
Trait Implementations§
Source§impl Clone for Truncation
impl Clone for Truncation
Source§fn clone(&self) -> Truncation
fn clone(&self) -> Truncation
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 Truncation
impl Debug for Truncation
Source§impl Default for Truncation
impl Default for Truncation
Source§fn default() -> Truncation
fn default() -> Truncation
Returns the “default value” for a type. Read more
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
Source§impl PartialEq for Truncation
impl PartialEq for Truncation
Source§impl Serialize for Truncation
impl Serialize for Truncation
impl Copy 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 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