pub enum Truncation {
Auto,
Disabled,
}Expand description
Controls truncation behavior for long inputs
This enum defines how the system should handle inputs that exceed the maximum context length.
§API Reference
Corresponds to the truncation parameter in the OpenAI Responses API.
Variants§
Auto
Automatically truncate inputs to fit context length
The system will automatically trim inputs to ensure they fit within the model’s context window.
Disabled
Disable truncation - return error if input is too long
The system will return an error rather than truncating inputs that exceed the context length.
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 (const: unstable) · 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 Display for Truncation
impl Display for Truncation
Source§impl FromStr for Truncation
impl FromStr 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