fix: ollama options

This commit is contained in:
Timothy Jaeryang Baek 2024-12-29 16:30:36 -08:00
parent 6de1923151
commit 79d7e67e51
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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: