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