pub enum InferenceError {
TokenizationFailed,
ContextFull,
EndOfText,
UserCallback(Box<dyn Error>),
}
Expand description
Errors encountered during the inference process.
Variants§
TokenizationFailed
During tokenization, one of the produced tokens was invalid / zero.
ContextFull
The context window for the model is full.
EndOfText
The model has produced an end of text token, signalling that it thinks that the text should end here.
Note that this error can be ignored and inference can continue, but the results are not guaranteed to be sensical.
UserCallback(Box<dyn Error>)
The user-specified callback returned an error.
Trait Implementations§
Source§impl Debug for InferenceError
impl Debug for InferenceError
Source§impl Display for InferenceError
impl Display for InferenceError
Source§impl Error for InferenceError
impl Error for InferenceError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for InferenceError
impl !RefUnwindSafe for InferenceError
impl !Send for InferenceError
impl !Sync for InferenceError
impl Unpin for InferenceError
impl !UnwindSafe for InferenceError
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