Download app/core/exceptions.py from aimprabu/RAG_Documentation_Assistant: direct link, hf CLI and curl.
- Browser
- Download file 793 Bytes
-
https://huggingface.co/spaces/aimprabu/RAG_Documentation_Assistant/resolve/main/app/core/exceptions.py
- Command line
-
hf download hf://spaces/aimprabu/RAG_Documentation_Assistant/app/core/exceptions.py
-
curl -L -o exceptions.py https://huggingface.co/spaces/aimprabu/RAG_Documentation_Assistant/resolve/main/app/core/exceptions.py
793 Bytes
| class RAGError(Exception): | |
| """Base exception for all RAG system failures.""" | |
| def __init__(self, message: str, details: dict = None): | |
| super().__init__(message) | |
| self.message = message | |
| self.details = details or {} | |
| class LLMProviderError(RAGError): | |
| """Raised when an external LLM API request fails or times out.""" | |
| pass | |
| class VectorStoreError(RAGError): | |
| """Raised when ChromaDB operations fail.""" | |
| pass | |
| class DatabaseError(RAGError): | |
| """Raised when SQLite registry or feedback store operations fail.""" | |
| pass | |
| class IngestionError(RAGError): | |
| """Raised when document parsing, loading, or chunking splits fail.""" | |
| pass | |
| class ValidationError(RAGError): | |
| """Raised when request payload parameters violate constraints.""" | |
| pass | |