Skip to main content

troupekit_context/
error.rs

1use troupekit_core::error::CoreError;
2
3/// Errors from memory, ingest and retrieval.
4/// `Core` passes a store error through unchanged, `Invalid` is rejected input
5/// and `Embed` is a failed or malformed embedding call.
6#[derive(Debug, Clone, PartialEq, thiserror::Error)]
7pub enum ContextError {
8    #[error(transparent)]
9    Core(#[from] CoreError),
10    #[error("invalid input: {0}")]
11    Invalid(String),
12    #[error("embedding failed: {0}")]
13    Embed(String),
14}