mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac
Co-Authored-By: _00_ <131402327+rgaricano@users.noreply.github.com>
This commit is contained in:
parent
ceb4948a28
commit
07357afcf6
1 changed files with 6 additions and 2 deletions
|
|
@ -2075,7 +2075,9 @@ def query_doc_handler(
|
|||
user=Depends(get_verified_user),
|
||||
):
|
||||
try:
|
||||
if request.app.state.config.ENABLE_RAG_HYBRID_SEARCH:
|
||||
if request.app.state.config.ENABLE_RAG_HYBRID_SEARCH and (
|
||||
form_data.hybrid is None or form_data.hybrid
|
||||
):
|
||||
collection_results = {}
|
||||
collection_results[form_data.collection_name] = VECTOR_DB_CLIENT.get(
|
||||
collection_name=form_data.collection_name
|
||||
|
|
@ -2145,7 +2147,9 @@ def query_collection_handler(
|
|||
user=Depends(get_verified_user),
|
||||
):
|
||||
try:
|
||||
if request.app.state.config.ENABLE_RAG_HYBRID_SEARCH:
|
||||
if request.app.state.config.ENABLE_RAG_HYBRID_SEARCH and (
|
||||
form_data.hybrid is None or form_data.hybrid
|
||||
):
|
||||
return query_collection_with_hybrid_search(
|
||||
collection_names=form_data.collection_names,
|
||||
queries=[form_data.query],
|
||||
|
|
|
|||
Loading…
Reference in a new issue