Co-Authored-By: _00_ <131402327+rgaricano@users.noreply.github.com>
This commit is contained in:
Timothy Jaeryang Baek 2025-08-26 16:54:36 +04:00
parent ceb4948a28
commit 07357afcf6

View file

@ -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],