pub enum ResponseTruncation {
Auto,
Disabled,
}Expand description
ResponseTruncation
JSON schema
{
"anyOf": [
{
"description": "The truncation strategy to use for the model response.\n- `auto`: If the input to this Response exceeds\n the model's context window size, the model will truncate the\n response to fit the context window by dropping items from the beginning of the conversation.\n- `disabled` (default): If the input size will exceed the context window\n size for a model, the request will fail with a 400 error.\n",
"type": "string",
"enum": [
"auto",
"disabled"
]
}
]
}Variants§
Auto
The truncation strategy to use for the model response.
auto: If the input to this Response exceeds the model’s context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation.disabled(default): If the input size will exceed the context window size for a model, the request will fail with a 400 error.
Disabled
The truncation strategy to use for the model response.
auto: If the input to this Response exceeds the model’s context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation.disabled(default): If the input size will exceed the context window size for a model, the request will fail with a 400 error.
Trait Implementations§
Source§impl Clone for ResponseTruncation
impl Clone for ResponseTruncation
Source§fn clone(&self) -> ResponseTruncation
fn clone(&self) -> ResponseTruncation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ResponseTruncation
Source§impl Debug for ResponseTruncation
impl Debug for ResponseTruncation
Source§impl<'de> Deserialize<'de> for ResponseTruncation
impl<'de> Deserialize<'de> for ResponseTruncation
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 ResponseTruncation
impl Display for ResponseTruncation
impl Eq for ResponseTruncation
Source§impl FromStr for ResponseTruncation
impl FromStr for ResponseTruncation
Source§impl Hash for ResponseTruncation
impl Hash for ResponseTruncation
Source§impl Ord for ResponseTruncation
impl Ord for ResponseTruncation
Source§fn cmp(&self, other: &ResponseTruncation) -> Ordering
fn cmp(&self, other: &ResponseTruncation) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ResponseTruncation
impl PartialEq for ResponseTruncation
Source§impl PartialOrd for ResponseTruncation
impl PartialOrd for ResponseTruncation
Source§impl Serialize for ResponseTruncation
impl Serialize for ResponseTruncation
impl StructuralPartialEq for ResponseTruncation
Source§impl TryFrom<&String> for ResponseTruncation
impl TryFrom<&String> for ResponseTruncation
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&str> for ResponseTruncation
impl TryFrom<&str> for ResponseTruncation
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for ResponseTruncation
impl TryFrom<String> for ResponseTruncation
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for ResponseTruncation
impl RefUnwindSafe for ResponseTruncation
impl Send for ResponseTruncation
impl Sync for ResponseTruncation
impl Unpin for ResponseTruncation
impl UnsafeUnpin for ResponseTruncation
impl UnwindSafe for ResponseTruncation
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