#[cfg(feature = "rag")]
mod store;
#[cfg(feature = "rag")]
mod config;
#[cfg(feature = "rag")]
mod embedding;
#[cfg(feature = "rag")]
mod knowledge_base;
#[cfg(feature = "rag-sqlite")]
mod sqlite_store;
#[cfg(feature = "rag-sqlite")]
pub use sqlite_store::*;
#[cfg(any(feature = "rag", feature = "rag-sqlite"))]
mod chunking;
#[cfg(any(feature = "rag", feature = "rag-sqlite"))]
pub use chunking::*;
#[cfg(any(feature = "rag", feature = "rag-sqlite"))]
mod sync;
#[cfg(any(feature = "rag", feature = "rag-sqlite"))]
pub use sync::*;
#[cfg(any(feature = "rag", feature = "rag-sqlite"))]
mod multimodal;
#[cfg(any(feature = "rag", feature = "rag-sqlite"))]
pub use multimodal::*;
#[cfg(feature = "rag")]
pub use store::*;
#[cfg(feature = "rag")]
pub use config::*;
#[cfg(feature = "rag")]
pub use embedding::*;
#[cfg(feature = "rag")]
pub use config::example_config;
#[cfg(feature = "rag")]
pub use knowledge_base::*;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum RagError {
#[error("Database connection failed: {0}")]
ConnectionFailed(String),
#[error("Query failed: {0}")]
QueryFailed(String),
#[error("Embedding dimension mismatch: expected {expected}, got {actual}")]
DimensionMismatch { expected: usize, actual: usize },
#[error("Configuration error: {0}")]
ConfigError(String),
#[error("Serialization error: {0}")]
SerializationError(String),
#[error("Embedding error: {0}")]
EmbeddingError(String),
}
pub type RagResult<T> = Result<T, RagError>;