jiayev / GPT4V-Image-Captioner

GNU General Public License v3.0
787 stars 58 forks source link

ResponseError('too many 429 error responses') #20

Closed 4beraser closed 9 months ago

4beraser commented 9 months ago

想着Q群和B站问都不太方便,就在这边提issue了,但不知道为啥他把我的原文翻译成英文了 不好意思…… Brief summary: After about 120 marks were made in the initial stage, the marking speed plummeted to 3-5 minutes per mark, and there was a high probability of the following errors: OOps: Something Else: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by ResponseError('too many 429 error responses')) I looked it up, and according to the article and the link (https://zhuanlan.zhihu.com/p/626593017), it seems that this can be circumvented by extending the interval between two requests, or exponential backoff, etc., and I do get a much faster response time when reversing a single image than when processing it in batches, and even if something goes wrong, I can get a quick result by closing and restarting the code. I don't know python, but I think the problem is that the batch doesn't have a wait time, or satisfies the ability to wait for a forced restart, and I don't seem to see the option in the code to wait on request.

Of course, the problem can also be with the provider of my APIkey. 能得到答案的话就再好不过了,感谢大佬……

4beraser commented 9 months ago

嗯,基本可以推断是API问题了,当我没问 (:з」∠)