Open reckonzzz opened 1 year ago
看起来是的 要不等一阵再试试看 或者降低一下发送频率
改一下 gpt_reader/bot/openai.py
里 OpenAIBotCore
这个类的 communicate
函数就好了。
def communicate(self, msg: List[dict], return_raw_text=True):
received = False
while not received:
try:
response = openai.ChatCompletion.create(
model=self.model,
messages=msg,
temperature=self.temperature
)
except openai.error.RateLimitError:
time.sleep(20)
else:
received = True
if return_raw_text:
return response["choices"][0]["message"]["content"]
else:
return response
openai.error.RateLimitError: Rate limit reached for default-gpt-3.5-turbo in organization org-PanV93eoQzPe3QALIzkJ8Iof on requests per min. Limit: 3 / min. Please try again in 20s.
请问这是因为访问频率过快吗?怎么解决这个问题呢?