Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

feat: +Exceeds the maximum retries exception

莘权 马6e459da87589
diff --git a/metagpt/provider/openai_api.py b/metagpt/provider/openai_api.py
index 27f22e491..4fab92fb3 100644
--- a/metagpt/provider/openai_api.py
+++ b/metagpt/provider/openai_api.py
@@ -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