fix: print message before sleep

This commit is contained in:
yihong0618 2023-03-10 20:54:07 +08:00
parent f566feabcb
commit cf44a19d82

View File

@ -47,8 +47,8 @@ class ChatGPTAPI(Base):
# 2. an apikey has no money or reach limit, dont sleep, just replace it with another apikey # 2. an apikey has no money or reach limit, dont sleep, just replace it with another apikey
# 3. all apikey reach limit, then use current sleep # 3. all apikey reach limit, then use current sleep
sleep_time = int(60 / self.key_len) sleep_time = int(60 / self.key_len)
print(e, f"will sleep {sleep_time} seconds")
time.sleep(sleep_time) time.sleep(sleep_time)
print(e, f"will sleep {sleep_time} seconds")
t_text = self.get_translation(text) t_text = self.get_translation(text)