From 677c36c3aa9df947145fcdb08c8c5af0bcc5e44c Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 29 Sep 2024 22:55:53 +0200 Subject: [PATCH] refac --- backend/open_webui/apps/retrieval/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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