Pārlūkot izejas kodu

Bad Gateway exception retry

master
lichengzhe pirms 1 gada
vecāks
revīzija
2d7dd71a3d
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      bot/chatgpt/chat_gpt_bot.py

+ 1
- 1
bot/chatgpt/chat_gpt_bot.py Parādīt failu

@@ -134,7 +134,7 @@ class ChatGPTBot(Bot, OpenAIImage):
result["content"] = "我没有收到你的消息"
if need_retry:
time.sleep(5)
elif isinstance(e, openai.error.APIError:):
elif isinstance(e, openai.error.APIError):
logger.warn("[CHATGPT] Bad Gateway: {}".format(e))
result["content"] = "请再问我一次"
if need_retry:


Notiek ielāde…
Atcelt
Saglabāt