Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ratelimit gets triggered #22

Open
hhenne1 opened this issue Jan 26, 2024 · 3 comments
Open

ratelimit gets triggered #22

hhenne1 opened this issue Jan 26, 2024 · 3 comments

Comments

@hhenne1
Copy link

hhenne1 commented Jan 26, 2024

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)

@ruecat
Copy link
Owner

ruecat commented Jan 26, 2024

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

@hhenne1
Copy link
Author

hhenne1 commented Jan 27, 2024

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)

@Roforum
Copy link

Roforum commented Apr 10, 2024

i have same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants