Commit Graph

13 Commits

Author SHA1 Message Date
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 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 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 371e53ab14 update mistral-chat command 2026-01-28 18:02:57 +03:00
melod1n 63c64dfa8e update error logging
cutting all kind of prefixes for prompt making
2026-01-28 16:40:29 +03:00
melod1n 458e56dcb4 update streaming for Gemini and Mistral and update list gemini models and list mistral models commands 2026-01-28 12:29:52 +03:00
melod1n 32baaebb93 update regex matching - now bot responds only for base commands (like /ping) and with mention (like /ping@panfilovi4_bot) and ignores command if it mentions other bot;
Add ability to see, change and list gemini, mistral and ollama models
2026-01-20 08:31:05 +03:00
melod1n ad8e3115db add gemini and mistral models to environment 2026-01-16 19:03:21 +03:00
melod1n 97582881ea optional usage of names in prompt 2026-01-16 16:14:40 +03:00
melod1n c491329d4f optional usage of names in prompt 2026-01-16 16:13:10 +03:00
melod1n 7047a5fa15 add user's names to messages 2026-01-16 16:04:10 +03:00
melod1n 38b312ae41 mistral ai vision for single image 2026-01-16 15:54:10 +03:00
melod1n 326cfcafc8 /mistral command for chat with Mistral AI 2026-01-16 15:40:15 +03:00