From 8e6ea49e0ec3eb68a1844d5b9ec12479ce00a230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Surmaczewski?= Date: Sun, 8 Sep 2024 17:52:58 +0200 Subject: [PATCH] fix: incorrect casting of top_p and frequency_penalty --- backend/open_webui/utils/payload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/utils/payload.py b/backend/open_webui/utils/payload.py index 227cca45f..b2654cd25 100644 --- a/backend/open_webui/utils/payload.py +++ b/backend/open_webui/utils/payload.py @@ -44,9 +44,9 @@ def apply_model_params_to_body( def apply_model_params_to_body_openai(params: dict, form_data: dict) -> dict: mappings = { "temperature": float, - "top_p": int, + "top_p": float, "max_tokens": int, - "frequency_penalty": int, + "frequency_penalty": float, "seed": lambda x: x, "stop": lambda x: [bytes(s, "utf-8").decode("unicode_escape") for s in x], }