Browse Source

Update Ollama request option list with full supported options

See https://github.com/ollama/ollama/blob/main/docs/api.md#request-8

This adds the full suite of supported Ollama options.
ferret99gt 2 months ago
parent
commit
cee08e316d
1 changed files with 13 additions and 1 deletions
  1. 13 1
      backend/open_webui/utils/payload.py

+ 13 - 1
backend/open_webui/utils/payload.py

@@ -76,14 +76,26 @@ def apply_model_params_to_body_ollama(params: dict, form_data: dict) -> dict:
         "num_ctx",
         "num_batch",
         "num_keep",
+        "num_predict",
         "repeat_last_n",
         "tfs_z",
         "top_k",
         "min_p",
+        "typical_p",
+        "repeat_penalty",
+        "presence_penalty",
+        "frequency_penalty",
+        "penalize_newline",
+        "stop",
+        "numa",
+        "num_gpu",
+        "main_gpu",
+        "low_vram",
+        "vocab_only",
         "use_mmap",
         "use_mlock",
         "num_thread",
-        "num_gpu",
+
     ]
     mappings = {i: lambda x: x for i in opts}
     form_data = apply_model_params_to_body(params, form_data, mappings)