mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 12:55:19 +00:00
Merge pull request #5277 from msurma/dev
fix: incorrect casting of top_p and frequency_penalty
This commit is contained in:
commit
b407f24950
1 changed files with 2 additions and 2 deletions
|
|
@ -44,9 +44,9 @@ def apply_model_params_to_body(
|
||||||
def apply_model_params_to_body_openai(params: dict, form_data: dict) -> dict:
|
def apply_model_params_to_body_openai(params: dict, form_data: dict) -> dict:
|
||||||
mappings = {
|
mappings = {
|
||||||
"temperature": float,
|
"temperature": float,
|
||||||
"top_p": int,
|
"top_p": float,
|
||||||
"max_tokens": int,
|
"max_tokens": int,
|
||||||
"frequency_penalty": int,
|
"frequency_penalty": float,
|
||||||
"seed": lambda x: x,
|
"seed": lambda x: x,
|
||||||
"stop": lambda x: [bytes(s, "utf-8").decode("unicode_escape") for s in x],
|
"stop": lambda x: [bytes(s, "utf-8").decode("unicode_escape") for s in x],
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue