1#[derive(Debug, Clone, PartialEq, thiserror::Error)]
6#[non_exhaustive]
7pub enum LocalError {
8 #[error("local model load failed: {0}")]
9 Load(String),
10 #[error("local tokenize failed: {0}")]
11 Tokenize(String),
12 #[error("local decode failed: {0}")]
13 Decode(String),
14 #[error("local context full: {needed} tokens needed, limit {limit}")]
15 ContextFull { needed: usize, limit: usize },
16 #[error("local grammar refused: {0}")]
17 Grammar(String),
18 #[error("local model does not support {0}")]
19 Unsupported(&'static str),
20 #[error("local model cache: {0}")]
21 Cache(String),
22 #[error("local model catalog: {0}")]
23 Catalog(String),
24}