update
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user