Browse Source

Updated middleware.py to add OpenRouter compatibility

binxn 1 tháng trước cách đây
mục cha
commit
efd86e2cb4
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      backend/open_webui/utils/middleware.py

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

@@ -1560,7 +1560,7 @@ async def process_chat_response(
 
                                     value = delta.get("content")
 
-                                    reasoning_content = delta.get("reasoning_content")
+                                    reasoning_content = delta.get("reasoning_content") or delta.get("reasoning")
                                     if reasoning_content:
                                         if (
                                             not content_blocks