Add comprehensive Perplexity model selection in setup wizard
Setup wizard improvements: - Expanded model dropdown with 6 Perplexity models: * sonar-pro (recommended default) * sonar * sonar-reasoning * llama-3.1-sonar-small-128k-online * llama-3.1-sonar-large-128k-online * llama-3.1-sonar-huge-128k-online - Added info button (?) next to model selector - Info popup explains each model's characteristics: * Performance * Use cases * Speed/quality tradeoffs * Cost considerations Created MODEL_CHANGE.md documentation: - How to change model in .env file - How to re-run setup wizard - Detailed model descriptions - Example configuration Users can now easily choose the right model for their needs and change it anytime without reconfiguring everything.
This commit is contained in:
parent
5e0ebbb1c4
commit
03df6035c5
2 changed files with 121 additions and 1 deletions
72
MODEL_CHANGE.md
Normal file
72
MODEL_CHANGE.md
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# Perplexity Modell ändern
|
||||
|
||||
Du kannst das Perplexity-Modell jederzeit ändern, ohne den Bot neu zu konfigurieren.
|
||||
|
||||
## Methode 1: .env Datei bearbeiten
|
||||
|
||||
1. Öffne die `.env` Datei in einem Texteditor
|
||||
2. Finde die Zeile `PERPLEXITY_MODEL=...`
|
||||
3. Ändere den Wert zu einem der verfügbaren Modelle:
|
||||
```
|
||||
PERPLEXITY_MODEL=sonar-pro
|
||||
```
|
||||
4. Speichern und Bot neu starten
|
||||
|
||||
## Methode 2: Setup Wizard neu ausführen
|
||||
|
||||
1. Lösche die `.env` Datei
|
||||
2. Starte den Bot: `python chatbot.py`
|
||||
3. Der Setup Wizard startet automatisch
|
||||
4. Wähle dein gewünschtes Modell aus der Dropdown-Liste
|
||||
|
||||
## Verfügbare Modelle
|
||||
|
||||
### Empfohlen für Chat Bots:
|
||||
|
||||
**sonar-pro** (Standard)
|
||||
- Beste Qualität und Reasoning
|
||||
- Ideal für Chat-Interaktionen
|
||||
- Gutes Preis-Leistungs-Verhältnis
|
||||
|
||||
### Alternative Modelle:
|
||||
|
||||
**sonar**
|
||||
- Schneller, günstiger
|
||||
- Für einfache Anfragen
|
||||
- Weniger komplex
|
||||
|
||||
**sonar-reasoning**
|
||||
- Erweitertes Reasoning
|
||||
- Für komplexe Probleme
|
||||
- Langsamer, aber durchdachter
|
||||
|
||||
**llama-3.1-sonar-small-128k-online**
|
||||
- Kleinster, schnellster Llama
|
||||
- 128k Kontext
|
||||
- Beste für schnelle, einfache Antworten
|
||||
|
||||
**llama-3.1-sonar-large-128k-online**
|
||||
- Größeres Llama-Modell
|
||||
- Bessere Qualität als small
|
||||
- Guter Kompromiss
|
||||
|
||||
**llama-3.1-sonar-huge-128k-online**
|
||||
- Größtes Llama-Modell
|
||||
- Beste Qualität, aber langsamer
|
||||
- Höhere Kosten
|
||||
|
||||
## Beispiel .env Datei
|
||||
|
||||
```env
|
||||
TWITCH_OAUTH_TOKEN=oauth:xxxxx
|
||||
TWITCH_BOT_NICKNAME=Eugen
|
||||
TWITCH_CHANNEL=#channel_name
|
||||
PERPLEXITY_API_KEY=pplx-xxxxx
|
||||
PERPLEXITY_MODEL=sonar-pro
|
||||
MAX_TOKENS=450
|
||||
DEBUG_MODE=true
|
||||
```
|
||||
|
||||
## Tipp
|
||||
|
||||
Wenn du verschiedene Modelle testen möchtest, erstelle eine Backup-Kopie deiner `.env` Datei vor dem Ändern.
|
||||
50
gui.py
50
gui.py
|
|
@ -218,7 +218,18 @@ class SetupWizard:
|
|||
|
||||
[sg.Text("PERPLEXITY CONFIGURATION", font=("Arial", 12, "bold"))],
|
||||
[sg.Text("API Key:", size=(20, 1)), sg.Input("pplx-", key="-API-KEY-", password_char="*")],
|
||||
[sg.Text("Model:", size=(20, 1)), sg.Combo(["sonar-pro", "sonar"], default_value="sonar-pro", key="-MODEL-")],
|
||||
[sg.Text("Model:", size=(20, 1)),
|
||||
sg.Combo([
|
||||
"sonar-pro",
|
||||
"sonar",
|
||||
"sonar-reasoning",
|
||||
"llama-3.1-sonar-small-128k-online",
|
||||
"llama-3.1-sonar-large-128k-online",
|
||||
"llama-3.1-sonar-huge-128k-online"
|
||||
], default_value="sonar-pro", key="-MODEL-", size=(35, 1)),
|
||||
sg.Button("?", key="-MODEL-INFO-", size=(2, 1))],
|
||||
[sg.Text("", size=(20, 1)),
|
||||
sg.Text("Recommended: sonar-pro (best quality)", font=("Arial", 8), text_color="gray")],
|
||||
[sg.Text("Max Tokens:", size=(20, 1)), sg.Input("450", key="-TOKENS-")],
|
||||
|
||||
[sg.HorizontalSeparator()],
|
||||
|
|
@ -240,6 +251,43 @@ class SetupWizard:
|
|||
if event == sg.WINDOW_CLOSED or event == "-CANCEL-":
|
||||
break
|
||||
|
||||
# Show model info
|
||||
if event == "-MODEL-INFO-":
|
||||
model_info = """PERPLEXITY MODEL OVERVIEW:
|
||||
|
||||
🔵 sonar-pro (RECOMMENDED)
|
||||
- Best quality and reasoning capabilities
|
||||
- Ideal for chat bots and complex queries
|
||||
- Good balance of speed and intelligence
|
||||
|
||||
🟢 sonar
|
||||
- Faster, lower cost
|
||||
- Good for simple queries
|
||||
- Less complex reasoning
|
||||
|
||||
🧠 sonar-reasoning
|
||||
- Enhanced reasoning for complex problems
|
||||
- Slower but more thoughtful responses
|
||||
|
||||
📚 llama-3.1-sonar-small-128k-online
|
||||
- Smallest, fastest Llama model
|
||||
- 128k context window
|
||||
- Best for simple, quick responses
|
||||
|
||||
📚 llama-3.1-sonar-large-128k-online
|
||||
- Larger Llama model
|
||||
- Better quality than small
|
||||
- Good balance
|
||||
|
||||
📚 llama-3.1-sonar-huge-128k-online
|
||||
- Largest Llama model
|
||||
- Best quality but slower
|
||||
- Higher cost
|
||||
|
||||
For most chat bots: Use sonar-pro"""
|
||||
sg.popup_scrolled(model_info, title="Model Information", size=(60, 25))
|
||||
continue
|
||||
|
||||
if event == "-SAVE-":
|
||||
# Validate inputs
|
||||
if not values["-OAUTH-"].startswith("oauth:"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue