Add optional AI reply via DeepSeek
Some checks failed
CI/CD Pipeline / build-and-deploy (push) Failing after 3s

Viewers can check a box on the send page to get a short AI-generated
reply to their message, voiced with a distinct TTS voice and queued
on the overlay after the original message. The system prompt lives
in ai-prompt.txt (editable without touching code) instead of being
hardcoded. TTS for both viewer messages and AI replies now announces
who it's from ("Сообщение от X." / "Ответ от ИИ.") before the text.
No-ops entirely if DEEPSEEK_API_KEY isn't set.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-07-01 17:23:41 +00:00
parent 03a3a4c4af
commit 2799dfdf42
6 changed files with 108 additions and 5 deletions

View file

@ -15,3 +15,13 @@ SESSION_SECRET=placeholder-session-secret-change-me
# same engine as t2sTelegramBot). Used for newly created streamers; each
# streamer's own voice is stored in the database and can be changed later.
TTS_VOICE=ru-RU-DmitryNeural
# Optional: DeepSeek API key (https://platform.deepseek.com) for the "AI reply"
# checkbox on the viewer send page. If unset, the feature silently no-ops even
# if a viewer checks the box. The system prompt used is in ai-prompt.txt.
DEEPSEEK_API_KEY=
# Voice used for AI replies specifically, deliberately different from a
# streamer's own TTS_VOICE so listeners can tell an AI reply apart from a
# human viewer's message.
AI_VOICE=ru-RU-SvetlanaNeural