| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
EduPlannerBotAI is a Telegram bot built with aiogram 3.x and powered by a multi-level LLM architecture. It generates personalized study plans, exports them to PDF/TXT, and sends reminders as Telegram messages. All data is stored using TinyDB (no other DBs supported).
Developed for ForgeFlow Tech: https://www.upwork.com/agencies/2050880168568328242/
Note: All code comments and docstrings are in English for international collaboration and code clarity. All user-facing messages and buttons are automatically translated to the user's selected language.
The bot features a sophisticated 4-tier fallback system that ensures reliable service even during complete internet outages:
| Priority | Service | Description | Use Case |
|---|---|---|---|
| 1 | OpenAI GPT | Primary model for high-quality plans | Best quality, when available |
| 2 | Groq | Secondary model, OpenAI alternative | Fast fallback, reliable service |
| 3 | Local LLM | Google Gemma 4 local model | Offline operation, privacy |
| 4 | Fallback Plan | Predefined professional template | Guaranteed availability |
The bot automatically attempts to generate study plans using available services in order of priority:
The same multi-level system applies to text translation:
| Metric | OpenAI | Groq | Local LLM | Fallback |
|---|---|---|---|---|
| Response Time | 2-5s | 1-3s | 0.5-2s | 0.1s |
| Availability | 99% | 99% | 100% | 100% |
| Cost | Per token | Per token | Free | Free |
| Privacy | External | External | Local | Local |
If the OpenAI API is unavailable, out of quota, or not configured, the bot automatically uses Groq as a fallback LLM provider.
GROQ_API_KEY=your_groq_api_keyChoose your preferred language for all bot interactions! Use /language to select from:
| Language | Code | Status |
|---|---|---|
| English | en | ✅ Primary |
| Русский | ru | ✅ Full support |
| Español | es | ✅ Full support |
git clone https://github.com/AlexTkDev/EduPlannerBotAI.git
cd EduPlannerBotAIpython -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtThe bot includes a local Google Gemma 4 model for offline operation:
Important: The model file is not included in the repository due to size limitations. You must download it separately:
# Download the model (choose one method)
# Option 1: Using wget
wget -O models/google-gemma-4b-it-Q4_K_M.gguf \
"<YOUR_GEMMA4_GGUF_DOWNLOAD_URL>"
# Option 2: Using curl
curl -L -o models/google-gemma-4b-it-Q4_K_M.gguf \
"<YOUR_GEMMA4_GGUF_DOWNLOAD_URL>"See models/README.md for detailed download instructions and troubleshooting.
The model is automatically loaded at startup and provides offline fallback capability.
Create a .env file in the root directory or rename .env.example to .env and fill in your tokens:
BOT_TOKEN=your_telegram_bot_token
OPENAI_API_KEY=your_openai_api_key
GROQ_API_KEY=your_groq_api_key
LOCAL_LLM_MODEL_PATH=models/google-gemma-4b-it-Q4_K_M.gguf
LOCAL_LLM_CONTEXT=4096
LOCAL_LLM_THREADS=4
LOCAL_LLM_MAX_TOKENS=512All environment variables are loaded from .env automatically.
python bot.pyRun the bot in a container:
docker-compose up --buildEnvironment variables are loaded from .env.
When you choose to schedule reminders, the bot sends a separate Telegram message for each study plan step, ensuring timely notifications directly in your chat.
EduPlannerBotAI/ ├── bot.py # Bot entry point ├── config.py # Load tokens from .env ├── handlers/ # Command and message handlers │ ├── __init__.py │ ├── start.py # /start and greeting │ ├── planner.py # Study plan generation flow │ └── language.py # Language selection and filter ├── services/ # Core logic and helper functions │ ├── llm.py # Multi-level LLM integration (OpenAI → Groq → Local LLM → Fallback) │ ├── local_llm.py # Local Google Gemma 4 model integration │ ├── pdf.py # PDF export │ ├── txt.py # TXT export │ ├── reminders.py # Reminder simulation │ └── db.py # TinyDB database ├── models/ # Local LLM model storage │ ├── README.md # Model download instructions │ └── .gitkeep # Preserve directory structure ├── .env # Environment variables ├── requirements.txt # Dependencies list └── README.md # Project documentation
| Component | Purpose | Version |
|---|---|---|
| Python | Programming language | 3.10+ |
| aiogram | Telegram Bot Framework | 3.x |
| OpenAI API | Primary LLM provider | Latest |
| Groq API | Secondary LLM provider | Latest |
| Local LLM | Google Gemma 4 offline | GGUF |
| llama-cpp-python | Local LLM inference | Latest |
| fpdf | PDF file generation | Latest |
| TinyDB | Lightweight NoSQL database | Latest |
| python-dotenv | Environment variable management | Latest |
| aiofiles | Asynchronous file operations | Latest |
If you experience too many 429 Too Many Requests errors:
We welcome contributions! To improve this bot:
Created with ❤️. For feedback and collaboration:
MIT License - see LICENSE file for details.
EduPlannerBotAI v4.1.0 transforms the bot from a simple OpenAI-dependent service into a robust system with fallback providers and offline operation capability. This release keeps backward compatibility while improving reliability and user experience.
| Back | FazBrowse Home | New Git URL |