jack 3 tuần trước cách đây
mục cha
commit
7a7f9797d6
1 tập tin đã thay đổi với 8 bổ sung2 xóa
  1. 8 2
      app/core/runner/thread_runner.py

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

@@ -87,17 +87,23 @@ class ThreadRunner:
         )
 
         asst_ids = []
+        ids = []
         if ast.tool_resources and "file_search" in ast.tool_resources:
-            asst_ids += (
+
+            ids = (
                 ast.tool_resources.get("file_search")
                 .get("vector_stores")[0]
                 .get("folder_ids")
             )
-            asst_ids += (
+            if ids:
+                asst_ids += ids
+            ids = (
                 ast.tool_resources.get("file_search")
                 .get("vector_stores")[0]
                 .get("file_ids")
             )
+            if ids:
+                asst_ids += ids
 
         if len(asst_ids) > 0:
             if len(run.file_ids) > 0: