Merge pull request #13 from Kenearos/claude/init-irc-bot-dashboard-kYxih

Add comprehensive Perplexity model selection in setup wizard
This commit is contained in:
Kenearos 2026-01-02 22:51:43 +01:00 committed by GitHub
commit 6f75529b91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 121 additions and 1 deletions

72
MODEL_CHANGE.md Normal file
View 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
View file

@ -218,7 +218,18 @@ class SetupWizard:
[sg.Text("PERPLEXITY CONFIGURATION", font=("Arial", 12, "bold"))], [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("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.Text("Max Tokens:", size=(20, 1)), sg.Input("450", key="-TOKENS-")],
[sg.HorizontalSeparator()], [sg.HorizontalSeparator()],
@ -240,6 +251,43 @@ class SetupWizard:
if event == sg.WINDOW_CLOSED or event == "-CANCEL-": if event == sg.WINDOW_CLOSED or event == "-CANCEL-":
break 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-": if event == "-SAVE-":
# Validate inputs # Validate inputs
if not values["-OAUTH-"].startswith("oauth:"): if not values["-OAUTH-"].startswith("oauth:"):