feat(llm): Live-Parameter top_p + Live/Restart-Kennzeichnung — Plan-Schritt 4
- local_llm_top_p (Default 0.9) durch Config -> runtime_config (RUNTIME_SETTABLE, live ohne Neustart) -> local-openai-compatible Payload (top_p). - Admin-Einstellungen: top_p als Slider (0–1); Hints "wirkt sofort (kein Neustart)" für temperature/top_p. - Doku: top_p + Klarstellung Live-Parameter (temp/top_p/max_tokens) vs. Startup-Wert Kontextfenster (OLLAMA_CONTEXT_LENGTH / llama.cpp -c). Verifiziert: top_p im Payload, Live-Config-Round-Trip (PUT/DELETE). 165 grün. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
5b6f0f8ef2
commit
b2576fd465
7 changed files with 16 additions and 3 deletions
|
|
@ -20,6 +20,7 @@ class LocalOpenAICompatibleLLM(LLMProvider):
|
|||
disable_reasoning: bool = True,
|
||||
max_tokens: int = 0,
|
||||
temperature: float = 0.3,
|
||||
top_p: float = 0.9,
|
||||
):
|
||||
self.base_url = base_url.rstrip("/")
|
||||
self.api_key = api_key
|
||||
|
|
@ -28,6 +29,7 @@ class LocalOpenAICompatibleLLM(LLMProvider):
|
|||
self.disable_reasoning = disable_reasoning
|
||||
self.max_tokens = max_tokens
|
||||
self.temperature = temperature
|
||||
self.top_p = top_p
|
||||
|
||||
def _build_messages(
|
||||
self, text: str, history: list[dict] | None, language: str | None = None
|
||||
|
|
@ -66,6 +68,7 @@ class LocalOpenAICompatibleLLM(LLMProvider):
|
|||
"model": self.model,
|
||||
"messages": self._build_messages(text, history, language=language),
|
||||
"temperature": self.temperature,
|
||||
"top_p": self.top_p,
|
||||
}
|
||||
if stream:
|
||||
payload["stream"] = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue