소스 검색

refac/fix: reasoning_content chunk

Timothy Jaeryang Baek 2 달 전
부모
커밋
f923a85f40
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      backend/open_webui/utils/misc.py

+ 1 - 1
backend/open_webui/utils/misc.py

@@ -227,7 +227,7 @@ def openai_chat_chunk_message_template(
     if tool_calls:
         template["choices"][0]["delta"]["tool_calls"] = tool_calls
 
-    if not content and not tool_calls:
+    if not content and not reasoning_content and not tool_calls:
         template["choices"][0]["finish_reason"] = "stop"
 
     if usage: