entrenar/monitor/llm/error.rs
1//! LLM evaluation error types.
2
3use thiserror::Error;
4
5/// LLM evaluation errors
6#[derive(Debug, Error)]
7pub enum LLMError {
8 #[error("Run not found: {0}")]
9 RunNotFound(String),
10
11 #[error("Prompt not found: {0}")]
12 PromptNotFound(String),
13
14 #[error("Evaluation failed: {0}")]
15 EvaluationFailed(String),
16
17 #[error("Invalid metric: {0}")]
18 InvalidMetric(String),
19
20 #[error("LLM error: {0}")]
21 Internal(String),
22}
23
24/// Result type for LLM operations
25pub type Result<T> = std::result::Result<T, LLMError>;