enh: unload hybrid model if set to False

This commit is contained in:
Timothy Jaeryang Baek 2025-04-02 18:15:14 -07:00
parent 0644abe402
commit 94bf49440d

View File

@ -124,7 +124,7 @@ def get_ef(
def get_rf(
reranking_model: str,
reranking_model: Optional[str] = None,
auto_update: bool = False,
):
rf = None
@ -762,6 +762,9 @@ async def update_query_settings(
form_data.hybrid if form_data.hybrid else False
)
if not request.app.state.config.ENABLE_RAG_HYBRID_SEARCH:
request.app.state.rf = None
return {
"status": True,
"template": request.app.state.config.RAG_TEMPLATE,