blob: 0ae4500caf06f3ac8a0b072839a4a0c0b7898153 (
about) (
plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
__all__ = [
"VecsException",
"CollectionAlreadyExists",
"CollectionNotFound",
"ArgError",
"FilterError",
"IndexNotFound",
"Unreachable",
]
class VecsException(Exception):
"""
Base exception class for the 'vecs' package.
All custom exceptions in the 'vecs' package should derive from this class.
"""
...
class CollectionAlreadyExists(VecsException):
"""
Exception raised when attempting to create a collection that already exists.
"""
...
class CollectionNotFound(VecsException):
"""
Exception raised when attempting to access or manipulate a collection that does not exist.
"""
...
class ArgError(VecsException):
"""
Exception raised for invalid arguments when calling a method.
"""
...
class MismatchedDimension(ArgError):
"""
Exception raised when multiple sources of truth for a collection's embedding dimension do not match.
"""
...
class FilterError(VecsException):
"""
Exception raised when there's an error related to filter usage in a query.
"""
...
class IndexNotFound(VecsException):
"""
Exception raised when attempting to access an index that does not exist.
"""
...
class Unreachable(VecsException):
"""
Exception raised when an unreachable part of the code is executed.
This is typically used for error handling in cases that should be logically impossible.
"""
...
class MissingDependency(VecsException, ImportError):
"""
Exception raised when attempting to access a feature that requires an optional dependency when the optional dependency is not present.
"""
...
|