Timothy Jaeryang Baek 2 月之前
父節點
當前提交
c073b8b4ee
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      backend/open_webui/retrieval/utils.py

+ 3 - 0
backend/open_webui/retrieval/utils.py

@@ -154,15 +154,18 @@ def merge_get_results(get_results: list[dict]) -> dict:
     # Initialize lists to store combined data
     combined_documents = []
     combined_metadatas = []
+    combined_ids = []
 
     for data in get_results:
         combined_documents.extend(data["documents"][0])
         combined_metadatas.extend(data["metadatas"][0])
+        combined_ids.extend(data["ids"][0])
 
     # Create the output dictionary
     result = {
         "documents": [combined_documents],
         "metadatas": [combined_metadatas],
+        "ids": [combined_ids],
     }
 
     return result