chatgpt-telegram
chatgpt-telegram copied to clipboard
Hitting Telegram rate-limits on message edits
I received the similar error frequently. It seems this bot use the edit message api to send(keep editing one message). When the message is long, the edit action will happen too frequently, then hit the api call rate limit. Hope could replace it by the normal send message.
Error Message:
2022/12/06 09:01:25 Couldn't edit message: Too Many Requests: retry after 30
2022/12/06 09:01:26 Couldn't edit message: Too Many Requests: retry after 29
2022/12/06 09:01:26 Couldn't perform final edit on message: Too Many Requests:
Fixes #28
Have a same problem. I think we should choose between editing and waiting for a full message. If you use language is not an English, chatgpt returns an answer in a very slow → many edits.
May recommendation: increase debounce timer to 3-4 sec (for messages)
Do you know why it's not authorized?
(base) chatgpt-telegram-Darwin-arm64 % ./chatgpt-telegram 2022/12/06 16:26:58 Started ChatGPT 2022/12/06 16:27:28 Couldn't start Telegram bot: Post Couldn't start Telegram bot: Post "https://api.telegram.org/bot[telegram_token]/getMe": dial tcp 128.242.250.148:443: i/o timeout
there is return value of the above link: {"ok":false,"error_code":401,"description":"Unauthorized"}
Do you know why it's not authorized?
(base) chatgpt-telegram-Darwin-arm64 % ./chatgpt-telegram 2022/12/06 16:26:58 Started ChatGPT 2022/12/06 16:27:28 Couldn't start Telegram bot: Post Couldn't start Telegram bot: Post "https://api.telegram.org/bot[telegram_token]/getMe": dial tcp 128.242.250.148:443: i/o timeout
there is return value of the above link: {"ok":false,"error_code":401,"description":"Unauthorized"}
Looks like token is wrong
Would be down for a PR that makes the number of seconds customizable
Would be down for a PR that makes the number of seconds customizable
I have implement this feat in this PR: Fixes #28
@m1guelpf Hope this PR could be merged, I have tested it on my server, works just fine.