From fd6239e751a3e6a1730332fee3058e13ec208fa8 Mon Sep 17 00:00:00 2001 From: fsatsuki <98732283+fsatsuki@users.noreply.github.com> Date: Fri, 7 Mar 2025 11:41:40 +0900 Subject: [PATCH] =?UTF-8?q?=E6=97=A2=E5=AD=98=E3=81=AEknowledge=20base?= =?UTF-8?q?=E3=82=92=E4=BD=BF=E3=81=86=E5=A0=B4=E5=90=88=E3=81=AB=E3=80=81?= =?UTF-8?q?Third=20party=20data=20sources=E3=81=AB=E5=AF=BE=E5=BF=9C?= =?UTF-8?q?=E3=81=99=E3=82=8B=20(#767)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/vector_search.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/backend/app/vector_search.py b/backend/app/vector_search.py index 3d30149d0..bc8f5916b 100644 --- a/backend/app/vector_search.py +++ b/backend/app/vector_search.py @@ -105,6 +105,22 @@ def extract_source_from_retrieval_result( source_name = urlparse(url=uri).path.split("/")[-1] return (source_name, uri) + elif location_type == "CONFLUENCE": + url = location.get("confluenceLocation", {}).get("url", "") + return (url, url) if url else None + + elif location_type == "SALESFORCE": + url = location.get("salesforceLocation", {}).get("url", "") + return (url, url) if url else None + + elif location_type == "SHAREPOINT": + url = location.get("sharePointLocation", {}).get("url", "") + return (url, url) if url else None + + elif location_type == "KENDRA": + url = location.get("kendraDocumentLocation", {}).get("uri", "") + return (url, url) if url else None + return None search_results = []