How wwwyssa/chat_ai_bot works
This is a Telegram conversational bot for chatting with an AI persona. Users register, choose text or voice replies, and send messages; the bot checks their account state, requests an OpenAI response, and optionally synthesizes it with Yandex SpeechKit. Conversation history is stored on user records and periodically summarized for future responses. The graph distinguishes bot orchestration, AI and speech integrations, and persistence. Source excerpts show these calls; prompt-file wiring and some Telegram internals are not independently verified.
Main entry points: bot.py Bot handlers · chat_gpt.py Response and memory · db_session.py Session setup · yandex_speechkit.py Voice synthesis
Components 9
Telegram bot
- Bot handlers
bot.py
AI services
- Response and memory
chat_gpt.py - OpenAI API
- Voice synthesis
yandex_speechkit.py - Yandex SpeechKit
User persistence
- Session setup
data/db_session.py - User records
data/users.py - SQLite database
db/users.db
Other components
- Telegram user
Connections 12
- Telegram user → Bot handlers: sends messages
bot.py - Bot handlers → Telegram user: sends replies
bot.py - Bot handlers → Session setup: creates sessions
bot.py - Bot handlers → User records: queries and updates
bot.py - Bot handlers → Response and memory: requests responses
bot.py - Bot handlers → Response and memory: requests summaries
bot.py - Bot handlers → Voice synthesis: requests synthesis
bot.py - Response and memory → Session setup: creates sessions
chat_gpt.py - Response and memory → User records: reads and updates
chat_gpt.py - Response and memory → OpenAI API: requests completions
chat_gpt.py - Voice synthesis → Yandex SpeechKit: synthesizes audio
yandex_speechkit.py - Session setup → SQLite database: connects to
data/db_session.py