jack 2 tháng trước cách đây
mục cha
commit
60c6bd3b0e
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      app/core/runner/thread_runner.py

+ 2 - 0
app/core/runner/thread_runner.py

@@ -194,6 +194,8 @@ class ThreadRunner:
             on_message_create_func=create_message_callback,
             event_handler=self.event_handler,
         )
+        if self.stream == False and hasattr(response_stream, "choices"):
+            response_stream = [response_stream]
         response_msg = llm_callback_handler.handle_llm_response(response_stream)
         message_creation_run_step = llm_callback_handler.step
         print("444444444444444444444444455555555577777777777777777777777")