Browse Source

Remove mapping of frequency_penalty to repeat_penalty

1) Ollama natively supports frequency_penalty.
2) repeat_penaltywas added to Open Webui in PR #10016 and is not merged to main yet at this time. Once both changes go live, Ollama users can freely choose between frequency/presence penalty, or repeat penalty, as they choose.
ferret99gt 2 months ago
parent
commit
e6919c3242
1 changed files with 0 additions and 4 deletions
  1. 0 4
      backend/open_webui/utils/payload.py

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

@@ -190,10 +190,6 @@ def convert_payload_openai_to_ollama(openai_payload: dict) -> dict:
     elif "max_tokens" in openai_payload:
         ollama_options["num_predict"] = openai_payload["max_tokens"]
 
-    # Handle frequency / presence_penalty, which needs renaming and checking
-    if "frequency_penalty" in openai_payload:
-        ollama_options["repeat_penalty"] = openai_payload["frequency_penalty"]
-
     # Add options to payload if any have been set
     if ollama_options:
         ollama_payload["options"] = ollama_options