jack 3 周之前
父節點
當前提交
7a7f9797d6
共有 1 個文件被更改,包括 8 次插入2 次删除
  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: