Procházet zdrojové kódy

Updated middleware.py to add OpenRouter compatibility

binxn před 1 měsícem
rodič
revize
efd86e2cb4
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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