This commit is contained in:
team3
2026-07-27 11:29:57 +02:00
parent 15ad6dfe8a
commit 1c8a4fd4fd
30 changed files with 1133 additions and 173 deletions

View File

@@ -11,6 +11,11 @@ MAX_TOKENS = 8000
API_VERSION = "2023-06-01"
class NichtKonfiguriert(ValueError):
"""Zugangsdaten fehlen. Eigener Typ, damit die Route das nicht mit
„Prüfung läuft bereits" verwechselt — beides wäre sonst ein ValueError."""
def pruefe_konfiguration():
fehlend = [
name
@@ -22,7 +27,7 @@ def pruefe_konfiguration():
if not wert
]
if fehlend:
raise ValueError(f"Nicht konfiguriert: {', '.join(fehlend)} in .env fehlt")
raise NichtKonfiguriert(f"Nicht konfiguriert: {', '.join(fehlend)} in .env fehlt")
async def frage(system: str, inhalt: str) -> str: