Skip to content

Commit 85753e4

Browse files
committed
minor fix
1 parent 40255a1 commit 85753e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

prompt2model/utils/api_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,14 @@ async def _throttled_completion_acreate(
169169
if isinstance(
170170
e,
171171
(
172-
openai.ServiceUnavailableError,
172+
openai.APIStatusError,
173173
openai.APIError,
174174
),
175175
):
176176
logging.warning(
177177
ERROR_ERRORS_TO_MESSAGES[type(e)].format(e=e)
178178
)
179-
elif isinstance(e, openai.InvalidRequestError):
179+
elif isinstance(e, openai.BadRequestError):
180180
logging.warning(ERROR_ERRORS_TO_MESSAGES[type(e)])
181181
return {
182182
"choices": [

0 commit comments

Comments
 (0)