Timothy J. Baek 7 tháng trước cách đây
mục cha
commit
677c36c3aa
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      backend/open_webui/apps/retrieval/utils.py

+ 1 - 1
backend/open_webui/apps/retrieval/utils.py

@@ -320,7 +320,7 @@ def get_rag_context(
         if file.get("context") == "full":
             context = {
                 "documents": [[file["content"]]],
-                "metadatas": [[{"file_id": file["id"], "name": file["name"]}]],
+                "metadatas": [[{"file_id": file.get("id"), "name": file.get("name")}]],
             }
         else:
             context = None