Kaynağa Gözat

refac/fix: tool response header type check

Timothy Jaeryang Baek 1 hafta önce
ebeveyn
işleme
680783266c
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      backend/open_webui/utils/middleware.py

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

@@ -2555,7 +2555,9 @@ async def process_chat_response(
                         ):
                             tool_result, tool_response_headers = tool_result
 
-                            if tool_response_headers:
+                            if tool_response_headers and isinstance(
+                                tool_response_headers, dict
+                            ):
                                 content_disposition = tool_response_headers.get(
                                     "Content-Disposition",
                                     tool_response_headers.get(