mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-28 20:31:53 +01:00
refactoring: working macro and generics
This commit is contained in:
21
src/error.rs
Normal file
21
src/error.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
use async_openai::error::OpenAIError;
|
||||
use thiserror::Error;
|
||||
|
||||
/// Error types for processing `TextContent`.
|
||||
#[derive(Error, Debug)]
|
||||
pub enum ProcessingError {
|
||||
#[error("SurrealDb error: {0}")]
|
||||
SurrealDbError(#[from] surrealdb::Error),
|
||||
|
||||
#[error("LLM processing error: {0}")]
|
||||
OpenAIerror(#[from] OpenAIError),
|
||||
|
||||
#[error("Embedding processing error: {0}")]
|
||||
EmbeddingError(String),
|
||||
|
||||
#[error("Graph processing error: {0}")]
|
||||
GraphProcessingError(String),
|
||||
|
||||
#[error("LLM parsing error: {0}")]
|
||||
LLMParsingError(String),
|
||||
}
|
||||
Reference in New Issue
Block a user