"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "eb5ed905eb33bf1fc6ecf20df752042d7bd9f7bf"
Commit e6bbce43 authored by Michael Poluektov's avatar Michael Poluektov
Browse files

fix: repeat_penalty

parent 670f28d6
...@@ -31,8 +31,6 @@ from utils.utils import ( ...@@ -31,8 +31,6 @@ from utils.utils import (
get_verified_user, get_verified_user,
get_admin_user, get_admin_user,
) )
from utils.task import prompt_template
from config import ( from config import (
SRC_LOG_LEVELS, SRC_LOG_LEVELS,
...@@ -47,7 +45,6 @@ from config import ( ...@@ -47,7 +45,6 @@ from config import (
from utils.misc import ( from utils.misc import (
apply_model_params_to_body_ollama, apply_model_params_to_body_ollama,
calculate_sha256, calculate_sha256,
add_or_update_system_message,
apply_model_params_to_body_openai, apply_model_params_to_body_openai,
apply_model_system_prompt_to_body, apply_model_system_prompt_to_body,
) )
......
...@@ -181,7 +181,12 @@ def apply_model_params_to_body_ollama(params: dict, form_data: dict) -> dict: ...@@ -181,7 +181,12 @@ def apply_model_params_to_body_ollama(params: dict, form_data: dict) -> dict:
] ]
mappings = {i: lambda x: x for i in opts} mappings = {i: lambda x: x for i in opts}
mappings = {**mappings, **OPENAI_MAPPINGS} mappings = {**mappings, **OPENAI_MAPPINGS}
return apply_model_params_to_body(params, form_data, mappings) form_data = apply_model_params_to_body(params, form_data, mappings)
# only param that changes name
if (param := params.get("frequency_penalty", None)) is not None:
form_data["repeat_penalty"] = param
return form_data
def get_gravatar_url(email): def get_gravatar_url(email):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment