mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 02:45:18 +00:00
lower OpenAI errors to warnings
This commit is contained in:
parent
9c1ab06491
commit
70da871876
1 changed files with 2 additions and 2 deletions
|
|
@ -147,13 +147,13 @@ class LiteLLMAIHandler(BaseAiHandler):
|
|||
|
||||
response = await acompletion(**kwargs)
|
||||
except (openai.APIError, openai.APITimeoutError) as e:
|
||||
get_logger().error("Error during OpenAI inference: ", e)
|
||||
get_logger().warning("Error during OpenAI inference: ", e)
|
||||
raise
|
||||
except (openai.RateLimitError) as e:
|
||||
get_logger().error("Rate limit error during OpenAI inference: ", e)
|
||||
raise
|
||||
except (Exception) as e:
|
||||
get_logger().error("Unknown error during OpenAI inference: ", e)
|
||||
get_logger().warning("Unknown error during OpenAI inference: ", e)
|
||||
raise openai.APIError from e
|
||||
if response is None or len(response["choices"]) == 0:
|
||||
raise openai.APIError
|
||||
|
|
|
|||
Loading…
Reference in a new issue