pub enum LmError {
Engine(String),
ProviderStream(String),
InvalidToolArguments(String),
ToolArgumentsNotObject,
IncompleteToolCall,
MissingToolCallId,
ToolCallSerialization(String),
}Expand description
Why a LanguageModel call failed.
Provider-neutral: an adapter maps its engine’s native error into one of these kinds, so no provider-specific error type reaches the public interface.
Variants§
Engine(String)
The generation engine itself failed — an inference error, a worker that crashed, a model that never loaded. Carries a human-readable description.
ProviderStream(String)
The provider stream failed mid-generation.
InvalidToolArguments(String)
A tool call’s arguments were structurally invalid.
ToolArgumentsNotObject
Tool-call arguments were not a JSON object.
IncompleteToolCall
A provider tool call was incomplete — missing its name or arguments.
MissingToolCallId
A provider tool call carried no identifier.
ToolCallSerialization(String)
Serializing validated tool arguments to JSON text failed.
Trait Implementations§
impl Eq for LmError
Source§impl Error for LmError
impl Error for LmError
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()
Source§impl From<LmError> for StageError
impl From<LmError> for StageError
impl StructuralPartialEq for LmError
Auto Trait Implementations§
impl Freeze for LmError
impl RefUnwindSafe for LmError
impl Send for LmError
impl Sync for LmError
impl Unpin for LmError
impl UnsafeUnpin for LmError
impl UnwindSafe for LmError
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