From 23bf71022e7d6401b8b84f2f1aa16e148eb120d6 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 25 Dec 2024 16:46:49 -0700 Subject: [PATCH] fix: title generation issue --- backend/open_webui/routers/openai.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/open_webui/routers/openai.py b/backend/open_webui/routers/openai.py index 96eac81fe..4ab381ea4 100644 --- a/backend/open_webui/routers/openai.py +++ b/backend/open_webui/routers/openai.py @@ -613,9 +613,8 @@ async def generate_chat_completion( payload["max_tokens"] = payload["max_completion_tokens"] del payload["max_completion_tokens"] - # TODO: check if below is needed - # if "max_tokens" in payload and "max_completion_tokens" in payload: - # del payload["max_tokens"] + if "max_tokens" in payload and "max_completion_tokens" in payload: + del payload["max_tokens"] # Convert the modified body back to JSON payload = json.dumps(payload)