You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+61-3Lines changed: 61 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,54 @@
6
6
7
7
## 📌 Features
8
8
9
-
- 📚 Generate personalized study plans (LLM/OpenAI)
9
+
- 📚 Generate personalized study plans (LLM/OpenAI, fallback to Groq)
10
10
- 📝 Export study plans to PDF/TXT
11
11
- ⏰ Send reminders as Telegram messages for each study step
12
12
- 🗄️ Store data using TinyDB
13
13
- 📊 Python 3.10–3.13 support
14
14
15
+
## 🆕 Groq Fallback Integration
16
+
17
+
If the OpenAI API is unavailable, out of quota, or not configured, the bot will automatically use [Groq](https://groq.com/) as a fallback LLM provider. Groq offers:
18
+
19
+
-**Fast and reliable generations**
20
+
-**No strict quotas for most users**
21
+
-**OpenAI-compatible API**
22
+
-**Always available fallback**
23
+
24
+
If both OpenAI and Groq are unavailable, the bot falls back to a local plan generator (simple stub).
25
+
26
+
### How it works
27
+
28
+
1.**Primary:** OpenAI API (if `OPENAI_API_KEY` is set and quota is available)
29
+
2.**Fallback:**[Groq](https://groq.com/) (if `GROQ_API_KEY` is set)
30
+
3.**Last resort:** Local plan generator (simple stub)
31
+
32
+
### How to use Groq
33
+
34
+
1. Register and get your API key at [Groq](https://console.groq.com/keys).
35
+
2. Add the following line to your `.env` file:
36
+
```
37
+
GROQ_API_KEY=your_groq_api_key
38
+
```
39
+
3. (Optional) Add to `.env.example` for documentation:
40
+
```
41
+
GROQ_API_KEY=your_groq_api_key
42
+
```
43
+
44
+
No other changes are needed — the bot will automatically use Groq if OpenAI is not available.
45
+
46
+
## 🌐 Multilingual Support
47
+
48
+
You can now choose your preferred language for all bot interactions! Use the `/language` command to select from English, Russian, or Spanish. The bot will automatically translate all responses, study plans, and reminders to your chosen language using LLMs (OpenAI or Groq). If translation is not possible, the original English text will be sent.
49
+
50
+
**Supported languages:**
51
+
- English (`en`)
52
+
- Русский (`ru`)
53
+
- Español (`es`)
54
+
55
+
Translations are performed in real time using the same LLMs that generate study plans, ensuring high-quality and context-aware results.
56
+
15
57
## 🚀 Quick Start
16
58
17
59
### 1. Clone the project
@@ -32,6 +74,7 @@ Create a `.env` file in the root directory or rename `.env.example` to `.env` an
0 commit comments