ChatSummarizer is a Telegram bot powered by Google's Gemini AI, designed to summarize and analyze conversations, as well as answer questions based on chat history.
- Summarize recent conversations
- Analyze user behavior and communication patterns
- Answer questions based on chat context
- Store message history in a database
- Python 3.7+
- Telegram Bot API credentials
- Google Gemini API key
- SQLAlchemy compatible database (default: SQLite)
-
Clone the repository:
git clone https://github.com/VelizarSeleznev/ChatSummarizer.git cd ChatSummarizer
-
Install required packages:
pip install -r requirements.txt
-
Set up environment variables in a
.env
file:TG_API_ID=<your_telegram_api_id> TG_API_HASH=<your_telegram_api_hash> TELEGRAM_BOT_TOKEN=<your_telegram_bot_token> GOOGLE_API_KEY=<your_google_gemini_api_key> DATABASE_URL=<your_database_url> # Optional, defaults to SQLite
Run the bot:
python main.py
/start
: Introduces the bot/summarize
: Summarizes recent conversations/analyze @username
: Analyzes a user's communication patterns/ask [question]
: Answers questions based on chat context
Contributions are welcome! Please feel free to submit a Pull Request.