mirror of
https://github.com/open-webui/open-webui
synced 2025-01-19 09:16:44 +00:00
fix: ollama options
This commit is contained in:
parent
6de1923151
commit
79d7e67e51
@ -561,7 +561,6 @@ def apply_params_to_form_data(form_data, model):
|
||||
|
||||
if "frequency_penalty" in params:
|
||||
form_data["frequency_penalty"] = params["frequency_penalty"]
|
||||
|
||||
return form_data
|
||||
|
||||
|
||||
|
@ -160,6 +160,10 @@ def convert_payload_openai_to_ollama(openai_payload: dict) -> dict:
|
||||
# If there are advanced parameters in the payload, format them in Ollama's options field
|
||||
ollama_options = {}
|
||||
|
||||
if openai_payload.get("options"):
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user