Commit Graph

28 Commits

Author SHA1 Message Date
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 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 12d9591109 some improvements for prompt making 2026-01-28 17:59:53 +03:00
melod1n 63c64dfa8e update error logging
cutting all kind of prefixes for prompt making
2026-01-28 16:40:29 +03:00
melod1n f66c669b2a remove keep_alive parameter 2026-01-22 14:13:18 +03:00
melod1n e833c16878 improvements 2026-01-22 13:50:36 +03:00
melod1n a7efc1a778 remove logging 2026-01-22 12:34:03 +03:00
melod1n 832db3a4c2 disable thinking 2026-01-21 20:13:25 +03:00
melod1n 193bb3d3ad support for thinking models, ux improvements 2026-01-21 20:10:10 +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 0e79bbb87d revert model options 2026-01-18 09:09:34 +03:00
melod1n ff4f59c84f edit markup on error 2026-01-16 22:05:59 +03:00
melod1n 5c7bf8cdaa test ollama options 2026-01-16 21:34:42 +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 d7dfe3f3a5 fix error 2026-01-16 11:10:22 +03:00
melod1n 8743258474 ability to cancel ollama generation 2026-01-15 20:03:47 +03:00
melod1n f70b103282 info about image size 2026-01-12 20:02:22 +03:00
melod1n f4289b86b4 info about image size 2026-01-12 20:00:35 +03:00
melod1n b9c95c9c6f info about image size 2026-01-12 19:58:30 +03:00
melod1n cbfd864bb4 info about image size 2026-01-12 19:53:39 +03:00
melod1n 3264b7c6d9 check if photo already downloaded 2026-01-12 19:45:19 +03:00
melod1n 123bda888f move max_photo_size to environment variable 2026-01-12 19:41:40 +03:00
melod1n 6eff5d17ea test support for images (ollama vision models) 2026-01-12 19:19:08 +03:00
melod1n df9471a7e4 refactor!: rewrite bot core; add AI (Ollama, Gemini), DB, new commands 2026-01-12 15:32:50 +03:00