15 Commits
Author SHA1 Message Date
Father BotandGitHub 3631d6534f fix: ignore unmentioned media in group chats; bump python-dotenv (#518)
- unsupport_message_handle now checks is_bot_mentioned, so the bot stops
  replying "I don't know how to read files or videos" to videos/documents
  it wasn't mentioned in within group chats (#454). Private chats are
  unaffected (is_bot_mentioned returns True there).
- Bump python-dotenv 1.0.1 -> 1.2.2 to resolve a Dependabot symlink-following
  advisory in set_key.
- Bump version to 1.3.1 and document in CHANGELOG.
2026-06-14 13:45:46 +03:00
Father Bot a32a06ab17 Bump python-dotenv to 1.0.1
Move from the 0.21 series to the stable 1.0.x line.
2026-02-08 09:17:26 +03:00
Father Bot e88059e35b Bump pymongo to 4.6.3
Update the MongoDB driver for bug fixes and Python 3.12 compatibility.
2026-02-05 13:54:40 +03:00
Father Bot 638fcf6d7b Bump PyYAML to 6.0.2
PyYAML 6.0 fails to build against Cython 3 on modern toolchains
(including Python 3.12). 6.0.1+ fixes this; pin 6.0.2.
2026-02-02 19:31:07 +03:00
Father Bot 92b824bc7c Bump python-telegram-bot to 20.8
Move to the latest 20.x release for bug fixes while staying within
the v20 major to avoid the breaking changes introduced in v21.
2026-01-30 10:08:52 +03:00
Father Bot d48276616a Migrate openai_utils to the openai 1.x SDK
Replace the deprecated module-level openai 0.28 API with the new
AsyncOpenAI client:
- instantiate AsyncOpenAI(api_key, base_url) instead of setting
  openai.api_key / openai.api_base globals
- ChatCompletion.acreate -> client.chat.completions.create
- Completion.acreate(engine=...) -> client.completions.create(model=...)
- Audio.atranscribe -> client.audio.transcriptions.create
- Image.acreate -> client.images.generate
- Moderation.acreate -> client.moderations.create (use .flagged)
- attribute access for message/delta content (.content instead of
  dict access) and guard empty streaming choices
- rename request_timeout option to timeout
- catch openai.BadRequestError instead of openai.error.InvalidRequestError

Bump openai to >=1.40.0,<2.0.0. Requires testing against the API.
2025-12-16 18:54:48 +03:00
Father Bot c8ffae21ad Bump tiktoken to >=0.7.0 for gpt-4o token counting
gpt-4o and gpt-4o-mini use the o200k_base encoding, which tiktoken
only ships from 0.7.0 onwards. With the previous >=0.3.0 pin
tiktoken.encoding_for_model("gpt-4o") raises, breaking token
counting in streaming mode for those models.
2025-12-11 12:08:26 +03:00
Karim IskakovandGitHub 977ffb5e32 Fix openai version 2023-11-07 03:29:32 +03:00
Daniil OkhlopkovandGitHub ce0c34825f Store Voice temp files in memory and don't convert them 2023-11-02 16:52:35 +03:00
Karim IskakovandGitHub 1ba09de2b9 Add message streaming
* Add message streaming
* Update README.md
2023-03-15 19:20:43 +03:00
Karim IskakovandGitHub 0610ea29cd Voice message recognition 2023-03-08 16:49:22 +03:00
0779808db3 Add support of ChatGPT API (#70)
Co-authored-by: Karim Iskakov <kar.iskakov@gmail.com>
2023-03-02 21:31:54 +03:00
Karim Iskakov fdb91a8da6 Move to MongoDB 2023-01-19 14:56:02 -06:00
Karim Iskakov da75ac50e0 Switch to GPT-3.5 engine 2023-01-16 14:20:47 -06:00
Karim Iskakov 4c36f8738a Working v0 2022-12-04 20:38:50 -06:00