ollama-telegram icon indicating copy to clipboard operation
ollama-telegram copied to clipboard

ratelimit gets triggered

Open hhenne1 opened this issue 1 year ago • 3 comments

Hey, the readme mentions streaming without a rate limit using the SentenceBySentence method. Unfortunately, the ratelimit apparently still triggers for me. Only I am currently testing the bot with about one question every 20 seconds or so. It only seems to come up when I address it in a group chat via "ask @bot" and the answer is a list of points. It hasn't happened in a direct chat with the bot yet. Am I missing a setting here, e.g. in the bot? (i'm running the current image shrirajhegde/ollama-telegram via docker-compose )

Traceback (most recent call last): File "/code/run.py", line 184, in handle_message await sent_message.edit_text(full_response_stripped) File "/usr/local/lib/python3.12/site-packages/aiogram/methods/base.py", line 84, in emit return await bot(self) ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiogram/client/bot.py", line 432, in __call__ return await self.session(self, method, timeout=request_timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiogram/client/session/base.py", line 257, in __call__ return cast(TelegramType, await middleware(bot, method)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiogram/client/session/aiohttp.py", line 179, in make_request response = self.check_response( ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiogram/client/session/base.py", line 110, in check_response raise TelegramRetryAfter( aiogram.exceptions.TelegramRetryAfter: Telegram server says - Flood control exceeded on method 'EditMessageText' in chat -100************. Retry in 3 seconds. Original description: Too Many Requests: retry after 3 (background on this error at: https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this)

hhenne1 avatar Jan 26 '24 00:01 hhenne1

I thought we solved problem with ratelimit. Also, you are using wrong image [shrirajhegde/ollama-telegram] -> [ruecat/ollama-telegram]

ruecat avatar Jan 26 '24 17:01 ruecat

thanks for the reply. i corrected the image. sadly it still triggers after a few longer answers in a row.. let me know if you need the logs.. (this time i tested it in a direct chat with the bot)

hhenne1 avatar Jan 27 '24 15:01 hhenne1

i have same problem.

Roforum avatar Apr 10 '24 19:04 Roforum