Skip to content

Commit

Permalink
既存のknowledge baseを使う場合に、Third party data sourcesに対応する (#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsatsuki authored Mar 7, 2025
1 parent dbf945e commit fd6239e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions backend/app/vector_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

0 comments on commit fd6239e

Please sign in to comment.