Commit Graph

140 Commits

Author SHA1 Message Date
dependabot[bot] 383d69f2dd Bump drizzle-kit from 1.0.0-beta.9-e89174b to 1.0.0-beta.15-9485290
Bumps [drizzle-kit](https://github.com/drizzle-team/drizzle-orm) from 1.0.0-beta.9-e89174b to 1.0.0-beta.15-9485290.
- [Release notes](https://github.com/drizzle-team/drizzle-orm/releases)
- [Commits](https://github.com/drizzle-team/drizzle-orm/commits)

---
updated-dependencies:
- dependency-name: drizzle-kit
  dependency-version: 1.0.0-beta.15-9485290
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-02 21:02:57 +00:00
melod1n 1f96e3553e * environment variable to enable/disable processing links in messages (for downloading videos)
* bot will not automatically download video from youtube or load it from cache. It will fetch video info first, then suggest to download or get video from cache (with retry options)
* some rewriting in sending/editing/replying to messages
2026-03-03 00:01:44 +03:00
melod1n 3f34a48d41 bump libs 2026-03-02 23:58:57 +03:00
melod1n 6dce990c4c update ytdl 2026-02-25 17:02:46 +03:00
melod1n 0c5d17663c update Dockerfiles to include downloading ffmpeg 2026-02-25 16:53:26 +03:00
melod1n 8bbf97e4c0 bump libs
rewrite ytdl command - now streaming both audio and video, separated, then merging using ffmpeg
2026-02-25 16:22:01 +03:00
melod1n 51db4ba9b5 fix using wrong dirs 2026-02-16 20:05:21 +03:00
melod1n c98528a54f fix 2026-02-16 20:00:25 +03:00
melod1n 2f0f10eed9 fix mkdir dirs 2026-02-16 19:57:35 +03:00
melod1n 8bec34413f some code cleanup 2026-02-16 19:52:28 +03:00
melod1n b8b3895310 update openAiGenImage params 2026-02-16 19:52:08 +03:00
melod1n 5b84376dc7 improve cache storage and cleanup (+ recursively) 2026-02-16 19:51:43 +03:00
melod1n 69ae37e05e /ae command now available if specifically set to 2026-02-16 19:50:07 +03:00
melod1n edcc0ddc91 Revert "move to debian-based runtime"
This reverts commit 751a0a1e15.
2026-02-16 16:40:28 +03:00
melod1n 751a0a1e15 move to debian-based runtime 2026-02-16 16:29:38 +03:00
melod1n c491996a5d (feat): graceful shutdown 2026-02-12 18:33:56 +03:00
melod1n 6ea9905c25 (feat): clearing up both photo and video after 1 day and on process' start 2026-02-12 18:22:37 +03:00
melod1n 4ce3229b5c (chore): change Info command base command from ChatCommand to Command 2026-02-12 18:22:01 +03:00
melod1n 2c7824ebc8 (feat): add image generation from openai 2026-02-12 18:21:29 +03:00
melod1n 8dbd9a456a (chore): add zod and bump deps 2026-02-12 14:56:58 +03:00
melod1n 82468cf61b chat with gemini now will use any first images 2026-02-12 14:48:13 +03:00
melod1n 2026c673f5 checking models capabilities 2026-02-12 14:22:43 +03:00
melod1n 77d0ca2f38 add info command 2026-02-12 13:14:10 +03:00
melod1n b9fa2538db add support for youtube music videos 2026-02-12 11:55:14 +03:00
melod1n 21ab362776 fix 2026-02-06 21:22:20 +03:00
melod1n ae431f6258 use apple emoji by default in quote command 2026-02-06 12:33:36 +03:00
melod1n fbbbebaf2e fix emoji naming 2026-02-06 12:20:00 +03:00
melod1n b1dfe93e22 fix regex 2026-02-06 12:05:20 +03:00
melod1n ae428d8415 fix usage of wrong entities if a quote is present 2026-02-06 12:05:11 +03:00
melod1n 9ba3d81a21 feat(ai): add configurable default provider + refactor telegram handlers
- add AiProvider enum and DEFAULT_AI_PROVIDER env var (fallback: OLLAMA)
- route chat execution based on selected provider (Ollama/Gemini/Mistral/OpenAI)
- move inline query / callback / edited message / my_chat_member handlers into utils
- minor cleanup (command requirements placement, whitespace)
2026-02-04 12:55:04 +03:00
melod1n 3c7d56b213 support for custom baseURL for OpenAI
fix messages' type in context chain
2026-02-04 12:16:31 +03:00
melod1n fc5478b5ec update bun.lock 2026-02-04 11:30:09 +03:00
dependabot[bot] 285067e640 Bump drizzle-kit from 1.0.0-beta.9-e89174b to 1.0.0-beta.13-5204f18 (#20)
Bumps [drizzle-kit](https://github.com/drizzle-team/drizzle-orm) from 1.0.0-beta.9-e89174b to 1.0.0-beta.13-5204f18.
- [Release notes](https://github.com/drizzle-team/drizzle-orm/releases)
- [Commits](https://github.com/drizzle-team/drizzle-orm/commits)

---
updated-dependencies:
- dependency-name: drizzle-kit
  dependency-version: 1.0.0-beta.13-5204f18
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 11:26:23 +03:00
dependabot[bot] f15e189019 Bump drizzle-orm from 1.0.0-beta.9-e89174b to 1.0.0-beta.13-5204f18 (#21)
Bumps [drizzle-orm](https://github.com/drizzle-team/drizzle-orm) from 1.0.0-beta.9-e89174b to 1.0.0-beta.13-5204f18.
- [Release notes](https://github.com/drizzle-team/drizzle-orm/releases)
- [Commits](https://github.com/drizzle-team/drizzle-orm/commits)

---
updated-dependencies:
- dependency-name: drizzle-orm
  dependency-version: 1.0.0-beta.13-5204f18
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 11:24:54 +03:00
melod1n 639c8ed9d0 update default OpenAI model 2026-02-03 13:55:50 +03:00
melod1n a28ac7f3a6 change ChatGPT -> OpenAI in OpenAIChat chat command 2026-02-03 13:44:28 +03:00
melod1n cf91f26ac9 add title and description to OpenAIChat chat command 2026-02-03 13:43:39 +03:00
melod1n a736f786c2 feat(openai): add chat streaming and model commands
- add /openai (/chatgpt) chat command using OpenAI Responses API (streaming + incremental edits)
- add /openAIListModels, /openAIGetModel, /openAISetModel
- introduce base Command class and migrate non-chat commands to it
- wire OpenAI client + env vars (OPENAI_API_KEY, OPENAI_MODEL)
- bump deps (@google/genai, systeminformation, @types/node) and add openai
2026-02-03 13:39:01 +03:00
melod1n 810151263d feat: separate Ollama text/image/think models + add YouTube downloader
Support OLLAMA_IMAGE_MODEL and new OLLAMA_THINK_MODEL (both default to OLLAMA_MODEL)

Add /ollamathink command; validate thinking capability; disable image-analysis flow in think mode

Make /ollama-get-model show Text/Image/Think blocks only when models differ

Add /ytdl (/youtube) command + auto-detect YouTube URLs in messages

Cache downloaded videos to data/video and schedule daily cleanup

Move photo storage from data/temp to data/photo; improve env boolean parsing via ifTrue

Update deps (youtubei.js, puppeteer*) and TS config (allowJs, allowSyntheticDefaultImports)
2026-01-31 19:37:25 +03:00
melod1n 23052fae0f separate ollama text & image models 2026-01-31 18:07:22 +03:00
melod1n 9e30086af2 fix(images): cache Telegram photos by unique_id and pass base64 to LLM commands
Stop reading image files inside gemini/mistral commands; use pre-encoded image data from message parts

Rework loadImagesIfExists / loadImagesFromFileIds to return cached file_unique_ids and download only missing sizes

Encode cached images to base64 when assembling the reply chain

Make getPhotoMaxSize synchronous (returns PhotoSize), and map to URL only when needed

Await MessageStore.put / UserStore.put and prefetch single-image downloads on message receipt
2026-01-29 20:58:08 +03:00
melod1n 4945db86c0 bump dependencies 2026-01-29 20:05:46 +03:00
melod1n b74e0a0f3e refactor(bot): centralize runtime state; support albums + safer vision handling
- make MessageStore.put() return StoredMessage and allow collectReplyChainText() to work with StoredMessage
- move muted users + answers loading into Environment (add Answers model + GEMINI_IMAGE_MODEL)
- extract message handling into processNewMessage() and add media-group (album) caching/downloading by unique_file_id
- for Ollama: check model capabilities before sending images; use replyToMessage helper consistently
- add /geminiGenImage command stub for Gemini image generation
2026-01-29 20:01:30 +03:00
melod1n 5f4405c9ee fix checking of same user requirement 2026-01-29 18:14:07 +03:00
melod1n 73905780b9 some updates 2026-01-28 19:47:50 +03:00
melod1n 8cf1773926 update default gemini model 2026-01-28 18:35:24 +03:00
melod1n 486a7a4f11 update gemini chat to interactions api 2026-01-28 18:19:53 +03:00
melod1n 371e53ab14 update mistral-chat command 2026-01-28 18:02:57 +03:00
melod1n 12d9591109 some improvements for prompt making 2026-01-28 17:59:53 +03:00
melod1n d1e1245ece update Dockerfile 2026-01-28 17:13:38 +03:00