update
This commit is contained in:
@@ -30,16 +30,17 @@ def pruefe_konfiguration():
|
||||
raise NichtKonfiguriert(f"Nicht konfiguriert: {', '.join(fehlend)} in .env fehlt")
|
||||
|
||||
|
||||
async def frage(system: str, inhalt: str) -> str:
|
||||
async def frage(system: str, inhalt: str, temperatur: float = 0.0) -> str:
|
||||
"""Eine Anfrage, eine Antwort — der Text der Modellantwort.
|
||||
Kalt geroutet: niedrige Temperatur, kein Thinking; die Prüfung soll nicht raten."""
|
||||
Kalt geroutet: Temperatur 0, kein Thinking; die Prüfung soll nicht raten.
|
||||
Für Mehrheitsentscheide wird sie bewusst angehoben, sonst wären die Stimmen gleich."""
|
||||
pruefe_konfiguration()
|
||||
daten = {
|
||||
"model": config.MINIMAX_MODELL,
|
||||
"max_tokens": MAX_TOKENS,
|
||||
"system": system,
|
||||
"messages": [{"role": "user", "content": inhalt}],
|
||||
"temperature": 0.2,
|
||||
"temperature": temperatur,
|
||||
"thinking": {"type": "disabled"},
|
||||
}
|
||||
async with httpx.AsyncClient(timeout=httpx.Timeout(ZEITLIMIT, connect=30)) as client:
|
||||
|
||||
Reference in New Issue
Block a user