Spaces:
Sleeping
Sleeping
Rafal
commited on
Commit
·
a4cea1f
1
Parent(s):
2a7e3b8
Updated OpenAI error to handle new version of OpenAI
Browse files- openAI_manager.py +3 -3
openAI_manager.py
CHANGED
@@ -48,9 +48,9 @@ Other attribute terms in this context are: {att_terms_str}. Use them for interpr
|
|
48 |
#print(f"Instruction: {instruction}")
|
49 |
|
50 |
# https://github.com/openai/openai-cookbook/blob/main/examples/How_to_handle_rate_limits.ipynb
|
51 |
-
@backoff.on_exception(backoff.expo, (openai.
|
52 |
-
openai.
|
53 |
-
openai.
|
54 |
ConnectionResetError,
|
55 |
json.decoder.JSONDecodeError))#,
|
56 |
#max_time=300,
|
|
|
48 |
#print(f"Instruction: {instruction}")
|
49 |
|
50 |
# https://github.com/openai/openai-cookbook/blob/main/examples/How_to_handle_rate_limits.ipynb
|
51 |
+
@backoff.on_exception(backoff.expo, (openai.RateLimitError,
|
52 |
+
openai.APIError,
|
53 |
+
openai.ServiceUnavailableError,
|
54 |
ConnectionResetError,
|
55 |
json.decoder.JSONDecodeError))#,
|
56 |
#max_time=300,
|