Social Post Writer Bot — development

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 shows the Telegram typing indicator while classifying, transcribing, reading images, and generating. It stores no conversation history.

  • Runtime: Python 3.12, aiogram 3.x
  • Release version is stored in VERSION and incremented for each code change; dev sends a version notice on boot.
  • In development, processing errors are returned to the user with a concise, secret-redacted reason.
  • 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.
  • The Tone of Voice response shows the extracted style instructions.
  • Each generated post is sent as its own message containing only the post text; retain the model's line breaks, paragraphs and emojis, without headings or explanations.
  • A screenshot gallery is processed once as one update; screenshots are analyzed together into a single ToV profile.
  • Telegram screenshots are sent to APInex as inline base64 data URLs; images and full source text are not persisted.

Local tests

Run python -m unittest discover -s tests -v.

S
Description
Telegram-бот для генерации постов для соцсетей: три варианта на запрос, Tone of Voice из скриншотов, голосовой ввод (STT), идеи и подписка (триал 3 дня, затем 100 звёзд/месяц). Python 3.12 + aiogram 3.x + APInex LLM/STT/vision + SQLite.
https://t.me/post_master_bot Readme
460 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 99.5%
Shell 0.4%