From b105efa05f05f6bf6cd79ae80cb3b30e473e9a3b Mon Sep 17 00:00:00 2001 From: Jannik Streidl Date: Mon, 7 Oct 2024 21:11:04 +0200 Subject: [PATCH] enh: append citations with distance scores --- backend/open_webui/apps/retrieval/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/open_webui/apps/retrieval/utils.py b/backend/open_webui/apps/retrieval/utils.py index 0fe206c96..d9e82f362 100644 --- a/backend/open_webui/apps/retrieval/utils.py +++ b/backend/open_webui/apps/retrieval/utils.py @@ -398,6 +398,7 @@ def get_rag_context( "source": context["file"], "document": context["documents"][0], "metadata": context["metadatas"][0], + "distances": context["distances"][0] } ) except Exception as e: