AI-powered Telegram bot that sends daily Ethiopian history facts using Groq + LangChain, with subscriptions, on-demand facts, and a built-in scheduler.
# Ethiopian History AI Bot
A sophisticated Telegram bot that delivers daily Ethiopian history facts powered by AI. Built with modern Python technologies and integrated with Groq's LLaMA-3 model for intelligent content generation.
## 🌟 Features
- **AI-Powered Content Generation**: Uses Groq's LLaMA-3 model via LangChain for intelligent history fact generation
- **Telegram Bot Integration**: Seamless user interaction through Telegram's messaging platformcommim
- **Automated Scheduling**: Daily fact delivery at configurable times using APScheduler
- **Subscription Management**: Users can subscribe/unsubscribe from daily facts
- **On-Demand Facts**: Request instant history facts with `/fact` command
- **Production-Ready**: Built with async/await patterns and proper error handling
- **Scalable Architecture**: Clean separation of concerns and modular design
## 🛠️ Tech Stack
- **Python 3.8+**: Core programming language
- **python-telegram-bot**: Telegram Bot API wrapper
- **LangChain**: AI/ML framework for language model integration
- **Groq**: High-performance AI inference platform
- **APScheduler**: Advanced Python scheduler
- **python-dotenv**: Environment variable management
- **asyncio**: Asynchronous programming support
## 📋 Prerequisites
- Python 3.8 or higher
- Telegram Bot Token (from @BotFather)
- Groq API Key (from Groq Console)
## 🚀 Quick Start
### 1. Clone the Repository
```bash
git clone
github.com
cd ethiopian-history-ai-bot
```
### 2. Create Virtual Environment
```bash
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
```
### 3. Install Dependencies
```bash
pip install -r requirements.txt
```
### 4. Environment Configuration
Create a `.env` file in the project root:
```env
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
GROQ_API_KEY=your_groq_api_key_here
DAILY_SEND_TIME=09:00
```
### 5. Run the Bot
```bash
python src/bot.py
```
## 📖 Usage …