mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-07 02:58:21 +00:00
refac
This commit is contained in:
parent
72fdf238a8
commit
7e31f64bc8
1 changed files with 2 additions and 2 deletions
|
|
@ -632,7 +632,7 @@ def merge_and_sort_query_results(query_results: list[dict], k: int) -> dict:
|
|||
|
||||
for distance, document, metadata in zip(distances, documents, metadatas):
|
||||
if isinstance(document, str):
|
||||
doc_hash = hashlib.sha256(document.encode()).hexdigest() # Compute a hash for uniqueness
|
||||
doc_hash = (metadata or {}).get(CHUNK_HASH_KEY) or _content_hash(document)
|
||||
|
||||
if doc_hash not in combined.keys():
|
||||
combined[doc_hash] = (distance, document, metadata)
|
||||
|
|
@ -1335,7 +1335,7 @@ async def get_sources_from_items(
|
|||
full_context=False,
|
||||
user: UserModel | None = None,
|
||||
):
|
||||
log.debug(f'items: {items} {queries} {embedding_function} {reranking_function} {full_context}')
|
||||
log.debug('items: %s %s %s %s %s', items, queries, embedding_function, reranking_function, full_context)
|
||||
|
||||
bypass_embedding_and_retrieval = await Config.get('rag.bypass_embedding_and_retrieval')
|
||||
extracted_collections = []
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue