Timothy J. Baek 6 mesi fa
parent
commit
d23f05fe0a
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      backend/open_webui/utils/misc.py

+ 1 - 1
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