Browse Source

Remove parameters that map directly, as they are part of options

1) This may be legacy code?
2) All three of these parameters, temperature, top_p and seed, are found in openai_payload["options"], not openai_payload. They do not need remapped any longer.
ferret99gt 2 months ago
parent
commit
adde37394b
1 changed files with 0 additions and 5 deletions
  1. 0 5
      backend/open_webui/utils/payload.py

+ 0 - 5
backend/open_webui/utils/payload.py

@@ -179,11 +179,6 @@ def convert_payload_openai_to_ollama(openai_payload: dict) -> dict:
         ollama_payload["options"] = openai_payload["options"]
         ollama_options = openai_payload["options"]
 
-    # Handle parameters which map directly
-    for param in ["temperature", "top_p", "seed"]:
-        if param in openai_payload:
-            ollama_options[param] = openai_payload[param]
-
     # Mapping OpenAI's `max_tokens` -> Ollama's `num_predict`
     if "max_tokens" in openai_payload:
         ollama_options["num_predict"] = openai_payload["max_tokens"]