feat: custom advanced params

This commit is contained in:
Timothy Jaeryang Baek
2025-05-29 03:33:11 +04:00
parent bb4115fa0e
commit 9220afe7b3
5 changed files with 103 additions and 56 deletions
+6
View File
@@ -658,6 +658,12 @@ async def chat_completion_files_handler(
def apply_params_to_form_data(form_data, model):
params = form_data.pop("params", {})
custom_params = params.pop("custom_params", {})
if custom_params:
# If custom_params are provided, merge them into params
params = deep_update(params, custom_params)
if model.get("ollama"):
form_data["options"] = params