From d23f05fe0aba2185da253637b60e57c834e49e73 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 6 Oct 2024 14:52:12 -0700 Subject: [PATCH] refac --- backend/open_webui/utils/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/misc.py b/backend/open_webui/utils/misc.py index bdce74b05..a5af492ba 100644 --- a/backend/open_webui/utils/misc.py +++ b/backend/open_webui/utils/misc.py @@ -122,7 +122,7 @@ def openai_chat_completion_message_template( ) -> dict: template = openai_chat_message_template(model) template["object"] = "chat.completion" - if message: + if message is not None: template["choices"][0]["message"] = {"content": message, "role": "assistant"} template["choices"][0]["finish_reason"] = "stop" return template