mirror of
https://github.com/open-webui/open-webui.git
synced 2025-03-27 02:02:31 +01:00
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.
This commit is contained in:
parent
a560f789e4
commit
e6919c3242
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user