We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a2ef18 commit c1da8ffCopy full SHA for c1da8ff
dspy/retrieve/chromadb_rm.py
@@ -8,6 +8,12 @@
8
import backoff
9
from dsp.utils import dotdict
10
11
+try:
12
+ import openai.error
13
+ ERRORS = (openai.error.RateLimitError, openai.error.ServiceUnavailableError, openai.error.APIError)
14
+except Exception:
15
+ ERRORS = (openai.RateLimitError, openai.APIError)
16
+
17
try:
18
import chromadb
19
from chromadb.config import Settings
@@ -108,7 +114,7 @@ def _init_chromadb(
108
114
109
115
@backoff.on_exception(
110
116
backoff.expo,
111
- (openai.RateLimitError),
117
+ ERRORS,
112
118
max_time=15,
113
119
)
120
def _get_embeddings(self, queries: List[str]) -> List[List[float]]:
0 commit comments