File size: 879 Bytes
2cb9dec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f844490
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
class DatabaseError(Exception):
    """Base exception for database errors."""

    pass


class QueryExecutionError(DatabaseError):
    """Exception raised when a database query fails."""

    pass


class EmbeddingError(Exception):
    """Base exception for embedding-related errors."""

    pass


class OpenAIError(EmbeddingError):
    """Exception raised when OpenAI API fails."""

    pass


class HuggingFaceError(Exception):
    """Base exception for Hugging Face-related errors."""

    pass


class DatasetNotFoundError(HuggingFaceError):
    """Exception raised when a dataset is not found."""

    pass


class DatasetPushError(HuggingFaceError):
    """Exception raised when pushing a dataset to Hugging Face Hub fails."""

    pass


class DatasetDeleteError(HuggingFaceError):
    """Exception raised when deleting a dataset on Hugging Face Hub fails."""

    pass