pub enum LibsyError {
TargetNotFound {
target: ModelId,
},
NoTargets,
AlgorithmError {
message: String,
},
Driver(DriverError),
MissingFinalResponse,
ClientCall {
target: ModelId,
source: LlmClientError,
},
InvalidDecision {
target: ModelId,
message: String,
},
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.
Fields
target: ModelIdMissing target model id.
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 routing outcome.
ClientCall
A target’s protocol client failed while serving a routed request.
Fields
target: ModelIdTarget whose client failed.
source: LlmClientErrorTyped error supplied by the protocol-owned client trait.
InvalidDecision
A decision judge returned an unusable answer.
Fields
target: ModelIdJudge that supplied the answer.
External
A user extension or other foreign operation failed.
Implementations§
Source§impl LibsyError
impl LibsyError
Sourcepub fn client_call(target: impl Into<ModelId>, source: LlmClientError) -> Self
pub fn client_call(target: impl Into<ModelId>, source: LlmClientError) -> Self
Wrap an error returned by the protocol-owned client trait.
Sourcepub fn invalid_decision(
target: impl Into<ModelId>,
message: impl Into<String>,
) -> Self
pub fn invalid_decision( target: impl Into<ModelId>, message: impl Into<String>, ) -> Self
Describe an invalid answer returned by a decision judge.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()