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 40255a1 commit 85753e4Copy full SHA for 85753e4
prompt2model/utils/api_tools.py
@@ -169,14 +169,14 @@ async def _throttled_completion_acreate(
169
if isinstance(
170
e,
171
(
172
- openai.ServiceUnavailableError,
+ openai.APIStatusError,
173
openai.APIError,
174
),
175
):
176
logging.warning(
177
ERROR_ERRORS_TO_MESSAGES[type(e)].format(e=e)
178
)
179
- elif isinstance(e, openai.InvalidRequestError):
+ elif isinstance(e, openai.BadRequestError):
180
logging.warning(ERROR_ERRORS_TO_MESSAGES[type(e)])
181
return {
182
"choices": [
0 commit comments