mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
retry on APIConnectionError
This commit is contained in:
parent
86309f336c
commit
3e4b4d1b0d
1 changed files with 8 additions and 1 deletions
|
@ -4,7 +4,13 @@ import json
|
|||
import backoff
|
||||
import openai
|
||||
import requests
|
||||
from openai.error import APIError, RateLimitError, ServiceUnavailableError, Timeout
|
||||
from openai.error import (
|
||||
APIConnectionError,
|
||||
APIError,
|
||||
RateLimitError,
|
||||
ServiceUnavailableError,
|
||||
Timeout,
|
||||
)
|
||||
|
||||
|
||||
@backoff.on_exception(
|
||||
|
@ -14,6 +20,7 @@ from openai.error import APIError, RateLimitError, ServiceUnavailableError, Time
|
|||
APIError,
|
||||
ServiceUnavailableError,
|
||||
RateLimitError,
|
||||
APIConnectionError,
|
||||
requests.exceptions.ConnectionError,
|
||||
),
|
||||
max_tries=10,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue