Comments (12)
Done! Merging now, thanks for testing
from chatgpt-telegram-bot.
Good catch @AlexHTW, I got a fix and i'll push it tomorrow
from chatgpt-telegram-bot.
Hi @AlexHTW, is this a Telegram or a ChatGPT limitation?
I don't have much time, but I added to the README in case someone wants to give it a try!
from chatgpt-telegram-bot.
Hey, it's a Telegram limitation. We would just need to split the response into multiple messages if response is larger than the Telegram limit. Thanks for adding it, maybe I can figure it out and contribute.
from chatgpt-telegram-bot.
@AlexHTW this should be fixed with #76. Can you confirm this?
from chatgpt-telegram-bot.
Hey @n3d1117, thanks.
Yeah I managed to get split messages for a 30 minute voice message and also from prompting for very long answers. So I would say everything works as intended.
I tested with 50-60 minute podcast mp3s and couldn't get a transcript, unfortunately also no log message. Maybe it's an API limit or something about the files itself. Don't think it has to do with this PR though, so I would say ship it ๐
from chatgpt-telegram-bot.
I noticed I don't receive a "new transcribe request received" info log when sending the bot podcast mp3s.
On the main branch I get the info log.
53min example file: https://content.blubrry.com/takeituneasy/lex_ai_noam_chomsky_2.mp3
from chatgpt-telegram-bot.
@AlexHTW you're right. Bots can download files of up to 20MB in size (source) and the .mp3 you linked is 38,1MB.
There was actually an exception raised in the context.bot.get_file
which wasn't handled. Should be improved now with f7bb416.
BTW I tried compressing your mp3 using an online tool, the download then worked but I got:
openai.error.APIError: Maximum content size limit (26214400) exceeded (50819087 bytes read) {
"error": {
"message": "Maximum content size limit (26214400) exceeded (50819087 bytes read)",
"type": "server_error",
"param": null,
"code": null
}
} 413
suggesting there's a limit (~26MB?) for Whisper requests too. I think you're better off splitting your audio into multiple files
from chatgpt-telegram-bot.
Thanks for the investigation! I was not aware of those limits.
I looked up the limitations in the Whisper docs, you are correct:
File uploads are currently limited to 25 MB and the following input file types are supported: mp3, mp4, mpeg, mpga, m4a, wav, and webm
The user feedback for files too large is important, thanks. I would suggest also telling the user the actual limit of 20MB when the file is too large.
from chatgpt-telegram-bot.
Hey, it looks like the streaming update broke the handling for long messages in chat responses.
After the telegram message limit is reached I get another message "Failed to get response: Message_too_long".
chatgpt-telegram-bot_1 | Traceback (most recent call last):
chatgpt-telegram-bot_1 | File "/app/bot/telegram_bot.py", line 370, in prompt
chatgpt-telegram-bot_1 | await context.bot.edit_message_text(content, chat_id=sent_message.chat_id,
chatgpt-telegram-bot_1 | File "/usr/local/lib/python3.9/site-packages/telegram/ext/_extbot.py", line 1453, in edit_message_text
chatgpt-telegram-bot_1 | return await super().edit_message_text(
chatgpt-telegram-bot_1 | File "/usr/local/lib/python3.9/site-packages/telegram/_bot.py", line 331, in decorator
chatgpt-telegram-bot_1 | result = await func(*args, **kwargs) # skipcq: PYL-E1102
chatgpt-telegram-bot_1 | File "/usr/local/lib/python3.9/site-packages/telegram/_bot.py", line 3230, in edit_message_text
chatgpt-telegram-bot_1 | return await self._send_message(
chatgpt-telegram-bot_1 | File "/usr/local/lib/python3.9/site-packages/telegram/ext/_extbot.py", line 488, in _send_message
chatgpt-telegram-bot_1 | result = await super()._send_message(
chatgpt-telegram-bot_1 | File "/usr/local/lib/python3.9/site-packages/telegram/_bot.py", line 512, in _send_message
chatgpt-telegram-bot_1 | result = await self._post(
chatgpt-telegram-bot_1 | File "/usr/local/lib/python3.9/site-packages/telegram/_bot.py", line 419, in _post
chatgpt-telegram-bot_1 | return await self._do_post(
chatgpt-telegram-bot_1 | File "/usr/local/lib/python3.9/site-packages/telegram/ext/_extbot.py", line 306, in _do_post
chatgpt-telegram-bot_1 | return await super()._do_post(
chatgpt-telegram-bot_1 | File "/usr/local/lib/python3.9/site-packages/telegram/_bot.py", line 450, in _do_post
chatgpt-telegram-bot_1 | return await request.post(
chatgpt-telegram-bot_1 | File "/usr/local/lib/python3.9/site-packages/telegram/request/_baserequest.py", line 165, in post
chatgpt-telegram-bot_1 | result = await self._request_wrapper(
chatgpt-telegram-bot_1 | File "/usr/local/lib/python3.9/site-packages/telegram/request/_baserequest.py", line 328, in _request_wrapper
chatgpt-telegram-bot_1 | raise BadRequest(message)
chatgpt-telegram-bot_1 | telegram.error.BadRequest: Message_too_long
example prompt: list all presidents of the United States with a short biography and list of their major achievements.
from chatgpt-telegram-bot.
Actually just pushed it now @AlexHTW, could you do a git pull and test it? bc6a4e4
from chatgpt-telegram-bot.
Awesome. Tested it, works great :) Thank you
from chatgpt-telegram-bot.
Related Issues (20)
- bot unstart HOT 1
- how i can use plugins? HOT 3
- Enabling and using plugins HOT 16
- Can't change model from 3.5 to 4 HOT 1
- Contributions to this Repo HOT 1
- deepl plugin returns text in unicode escape sequence HOT 4
- Exception while handling an update: getattr():
- Deployment issues with fly.io
- ะะพะพะธะด
- Duck Duck Go Rate Limit HOT 1
- Update docker image in docker hub HOT 1
- Separate /image commands for Dall-E 2 and Dall-E 3
- audo ---> text HOT 1
- DDG HOT 3
- Everything worked and abruptly stopped working HOT 1
- Bugs in the operation of plugins: auto_tts, ddg_ddg_search, and ddg_images_earch (403, HttpError).
- stop or new dialog
- Add support for gpt-4-turbo-2024-04-09 HOT 1
- am i the only one facing this? HOT 4
- Why do the robot's responses always lack the first two bytes?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatgpt-telegram-bot.