Merge pull request #5277 from msurma/dev

fix: incorrect casting of top_p and frequency_penalty
This commit is contained in:
Timothy Jaeryang Baek 2024-09-09 04:36:22 +01:00 committed by GitHub
commit b407f24950
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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],
}