diff --git a/backend/open_webui/apps/retrieval/utils.py b/backend/open_webui/apps/retrieval/utils.py index 6b12f76a1..cfae8a80b 100644 --- a/backend/open_webui/apps/retrieval/utils.py +++ b/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