From 7fbaf0d6312104521ff56aa7ded6c26737881ab6 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 4 Oct 2026 20:55:20 +0200 Subject: [PATCH] feat: route requests to social post writer --- README.md | 15 +++++++-------- bot.py | 5 ----- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 7241425..9f114b5 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,14 @@ # Social Post Writer Bot — development -The bot prepares social media posts on explicit request. It uses APInex STT for Russian voice messages and Gemini 3.8 Flash through APInex for intent classification, post writing/revision, and visual reading of post screenshots to infer a personal Tone of Voice. +The bot prepares social-media posts only when the user explicitly asks. It transcribes Russian voice notes with APInex STT, classifies intent with an LLM, and uses Gemini 3.8 Flash via APInex to write/revise posts or infer Tone of Voice from a screenshot. A post request/revision returns three separate messages. The bot stores no conversation history. - Runtime: Python 3.12, aiogram 3.x -- Coolify environment: `development` on `spb-easy-dale` -- Gitea branch: `dev` -- Runtime variables are configured only in Coolify: `BOT_TOKEN`, `BOT_ENV`, `APINEX_API_KEY`, `APINEX_STT_MODEL`, `APINEX_INTENT_CLASSIFIER_MODEL`, `APINEX_POST_WRITER_MODEL`, `APINEX_IMAGE_TONE_MODEL`, `BOT_DB_PATH`. -- Models default to `gemini-3.8-flash`; STT defaults to APInex `nova-2`. -- Per-user Tone of Voice is stored in SQLite at `/app/data/social_writer.sqlite3`; mount a persistent Coolify volume at `/app/data`. -- Each explicit post request and each reply-edit returns three posts as separate Telegram messages. No conversational history is stored. -- Screenshots are sent to vision using inline base64 data URLs; uploaded images and source post texts are not persisted. +- Coolify: project `Social Post Writer Bot`, environment `development`, server `spb-easy-dale` +- Gitea: `admin/social-post-writer-bot`, branch `dev` +- API key and model variables are stored only in Coolify: `APINEX_API_KEY`, `APINEX_STT_MODEL`, `APINEX_INTENT_CLASSIFIER_MODEL`, `APINEX_POST_WRITER_MODEL`, `APINEX_IMAGE_TONE_MODEL`. +- LLM model env defaults are `gemini-3.8-flash`; STT model defaults to APInex `nova-2`. +- Per-user Tone of Voice lives in SQLite at `/app/data/social_writer.sqlite3`; persistent Coolify storage must be mounted at `/app/data`. +- Telegram screenshots are sent to APInex as inline base64 data URLs; images and full source text are not persisted. ## Local tests diff --git a/bot.py b/bot.py index 9553c7b..4a44262 100644 --- a/bot.py +++ b/bot.py @@ -177,11 +177,6 @@ async def handle_text(message: Message) -> None: await _classify_and_respond(message, message.text) -async def echo(message: Message) -> None: - if message.text: - await message.answer(message.text) - - async def main() -> None: init_db() token = os.environ.get("BOT_TOKEN", "").strip()