mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
feat: +Exceeds the maximum retries exception
This commit is contained in:
parent
6442869591
commit
6e459da875
1 changed files with 2 additions and 0 deletions
|
|
@ -403,6 +403,7 @@ class OpenAIGPTAPI(BaseGPTAPI, RateLimiter):
|
|||
error_str = traceback.format_exc()
|
||||
logger.error(f"Exception:{e}, stack:{error_str}")
|
||||
raise e
|
||||
raise openai.error.OpenAIError("Exceeds the maximum retries")
|
||||
|
||||
@staticmethod
|
||||
def retry_call(func, *args, **kwargs):
|
||||
|
|
@ -420,5 +421,6 @@ class OpenAIGPTAPI(BaseGPTAPI, RateLimiter):
|
|||
error_str = traceback.format_exc()
|
||||
logger.error(f"Exception:{e}, stack:{error_str}")
|
||||
raise e
|
||||
raise openai.error.OpenAIError("Exceeds the maximum retries")
|
||||
|
||||
MAX_TRY = 5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue