mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac
This commit is contained in:
parent
f56889c5c7
commit
85153afda8
1 changed files with 6 additions and 6 deletions
|
|
@ -128,12 +128,12 @@ def query_doc_with_hybrid_search(
|
||||||
log.warning(f"query_doc_with_hybrid_search:no_docs {collection_name}")
|
log.warning(f"query_doc_with_hybrid_search:no_docs {collection_name}")
|
||||||
return {"documents": [], "metadatas": [], "distances": []}
|
return {"documents": [], "metadatas": [], "distances": []}
|
||||||
|
|
||||||
log.debug(f"query_doc_with_hybrid_search:doc {collection_name}")
|
log.debug(f"query_doc_with_hybrid_search:doc {collection_name}")
|
||||||
bm25_retriever = BM25Retriever.from_texts(
|
bm25_retriever = BM25Retriever.from_texts(
|
||||||
texts=collection_result.documents[0],
|
texts=collection_result.documents[0],
|
||||||
metadatas=collection_result.metadatas[0],
|
metadatas=collection_result.metadatas[0],
|
||||||
)
|
)
|
||||||
bm25_retriever.k = k
|
bm25_retriever.k = k
|
||||||
|
|
||||||
vector_search_retriever = VectorSearchRetriever(
|
vector_search_retriever = VectorSearchRetriever(
|
||||||
collection_name=collection_name,
|
collection_name=collection_name,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue