pub enum EngineError {
Invalid {
code: ErrorCode,
message: String,
question_id: Option<String>,
},
NoLabelMatched {
question_id: String,
expected: Vec<String>,
observed: Vec<String>,
},
UnknownModel {
model: String,
host: String,
source: HostError,
},
Host(HostError),
}Variants§
Invalid
NoLabelMatched
The model answered, but with nothing resembling one of the labels we offered.
Distinct from a host failure: the runtime worked, the model simply did not follow the
instruction. Almost always this means the model is too small or too chatty for the job,
which is what the benchmark in cerno-bench exists to catch before deployment.
UnknownModel
The host answered 404 to a question naming model.
Every runtime answers a model it does not have that way, and without strict_models
that is where a misspelt model surfaces — the caller’s to fix, so not a 5xx inviting a
retry. But a host URL missing its /v1 answers 404 to every model as well, so the
message says what to check when it is not the model.
Host(HostError)
Implementations§
Source§impl EngineError
impl EngineError
Trait Implementations§
Source§impl Debug for EngineError
impl Debug for EngineError
Source§impl Display for EngineError
impl Display for EngineError
Source§impl Error for EngineError
impl Error for EngineError
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 EngineError
impl RefUnwindSafe for EngineError
impl Send for EngineError
impl Sync for EngineError
impl Unpin for EngineError
impl UnsafeUnpin for EngineError
impl UnwindSafe for EngineError
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