pub enum LibsyError {
TargetNotFound {
target: String,
},
NoTargets,
AlgorithmError {
message: String,
},
Driver(DriverError),
MissingFinalResponse,
ClientCall {
target: String,
source: LlmClientError,
},
AllTargetsExcluded,
External {
operation: &'static str,
source: Box<dyn StdError + Send + Sync>,
},
}Expand description
Failures surfaced while selecting a route, driving an algorithm, or serving a model call.
Variants§
TargetNotFound
A named target was not present in the configured target set.
NoTargets
Routing was attempted without any configured targets.
AlgorithmError
An algorithm could not complete for an algorithm-specific reason.
Driver(DriverError)
The step-stream driver could not complete an operation.
MissingFinalResponse
An algorithm’s step stream ended without a terminal response.
ClientCall
A target’s protocol client failed while serving a routed request.
Fields
§
source: LlmClientErrorTyped error supplied by the protocol-owned client trait.
AllTargetsExcluded
Every target overflowed its context window.
External
A user extension or other foreign operation failed.
Implementations§
Source§impl LibsyError
impl LibsyError
Sourcepub fn client_call(target: impl Into<String>, source: LlmClientError) -> Self
pub fn client_call(target: impl Into<String>, source: LlmClientError) -> Self
Wrap an error returned by the protocol-owned client trait.
Trait Implementations§
Source§impl Debug for LibsyError
impl Debug for LibsyError
Source§impl Display for LibsyError
impl Display for LibsyError
Source§impl Error for LibsyError
impl Error for LibsyError
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<DriverError> for LibsyError
impl From<DriverError> for LibsyError
Source§fn from(source: DriverError) -> Self
fn from(source: DriverError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LibsyError
impl !RefUnwindSafe for LibsyError
impl Send for LibsyError
impl Sync for LibsyError
impl Unpin for LibsyError
impl UnsafeUnpin for LibsyError
impl !UnwindSafe for LibsyError
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