Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
saum7800 committed Apr 15, 2024
1 parent 40255a1 commit 85753e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prompt2model/utils/api_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ async def _throttled_completion_acreate(
if isinstance(
e,
(
openai.ServiceUnavailableError,
openai.APIStatusError,
openai.APIError,
),
):
logging.warning(
ERROR_ERRORS_TO_MESSAGES[type(e)].format(e=e)
)
elif isinstance(e, openai.InvalidRequestError):
elif isinstance(e, openai.BadRequestError):
logging.warning(ERROR_ERRORS_TO_MESSAGES[type(e)])
return {
"choices": [
Expand Down

0 comments on commit 85753e4

Please sign in to comment.