Jelajahi Sumber

refac/fix: inherit model stream_response setting

Timothy Jaeryang Baek 3 bulan lalu
induk
melakukan
f138be9d8a
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      backend/open_webui/main.py

+ 3 - 0
backend/open_webui/main.py

@@ -1561,6 +1561,9 @@ async def chat_completion(
         reasoning_tags = form_data.get("params", {}).get("reasoning_tags")
         reasoning_tags = form_data.get("params", {}).get("reasoning_tags")
 
 
         # Model Params
         # Model Params
+        if model_info_params.get("stream_response") is not None:
+            form_data["stream"] = model_info_params.get("stream_response")
+
         if model_info_params.get("stream_delta_chunk_size"):
         if model_info_params.get("stream_delta_chunk_size"):
             stream_delta_chunk_size = model_info_params.get("stream_delta_chunk_size")
             stream_delta_chunk_size = model_info_params.get("stream_delta_chunk_size")