Hey there, I am using ChatGPT via API over Telegram Bots.
Everything works fine. People ask the AI in my Group via /ask and the bot answers.
But sometimes it stops responding, after watching PyCharm I get this error openai.error.ServiceUnavailableError - Too many requests…
The bot stops working and I need to manually restart. Did someone resolve this type of problem?
Is there a code, which restarts a .py automatically after a crash? Or is there a way to have an error like that and it continues?
I suspect it is too much traffic from specific IP addresses
When people use VPN’s or proxies, they tend to share a common IP address range, and also company or education sites where several users access the internet through the same common network connection
I think, over time, the VPN IP addresses (and cloudflare relay servers) are getting blacklisted as “high users” at ChatGPT. That would explain why it took a while to show up and is getting worse over time
okey thank you.
Yea I thought about its about the traffic.
The only thing I want to solve is, that my bot should at least write something like “Error, please try again” instead of crashing and manually starting it again.
I just keep restarting the bot. Currently working on a code, which restarts automatically. I also tried a sleep timer for making less requests and avoid error but doesn’t work. Also changing to davinci model 2 made the bot worse.
telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 670
Seems like too many requests again, or a wrong starting sign… My only solution is to dublicate the bot and if it crashes, it shall run the second bot. But shell commands can’t be run in Pycharm so idk what to do now.