mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
Added APIError
This commit is contained in:
parent
8dcf819cb5
commit
fe3f1c194d
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ import backoff
|
|||
import git
|
||||
import openai
|
||||
import requests
|
||||
from openai.error import RateLimitError, ServiceUnavailableError
|
||||
from openai.error import APIError, RateLimitError, ServiceUnavailableError
|
||||
from rich.console import Console
|
||||
from rich.live import Live
|
||||
from rich.markdown import Markdown
|
||||
|
@ -494,7 +494,7 @@ class Coder:
|
|||
|
||||
@backoff.on_exception(
|
||||
backoff.expo,
|
||||
(ServiceUnavailableError, RateLimitError, requests.exceptions.ConnectionError),
|
||||
(APIError, ServiceUnavailableError, RateLimitError, requests.exceptions.ConnectionError),
|
||||
max_tries=5,
|
||||
on_backoff=lambda details: print(f"Retry in {details['wait']} seconds."),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue