mirror of
https://github.com/open-webui/open-webui
synced 2025-06-23 02:16:52 +00:00
enh: unload hybrid model if set to False
This commit is contained in:
parent
0644abe402
commit
94bf49440d
@ -124,7 +124,7 @@ def get_ef(
|
|||||||
|
|
||||||
|
|
||||||
def get_rf(
|
def get_rf(
|
||||||
reranking_model: str,
|
reranking_model: Optional[str] = None,
|
||||||
auto_update: bool = False,
|
auto_update: bool = False,
|
||||||
):
|
):
|
||||||
rf = None
|
rf = None
|
||||||
@ -762,6 +762,9 @@ async def update_query_settings(
|
|||||||
form_data.hybrid if form_data.hybrid else False
|
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 {
|
return {
|
||||||
"status": True,
|
"status": True,
|
||||||
"template": request.app.state.config.RAG_TEMPLATE,
|
"template": request.app.state.config.RAG_TEMPLATE,
|
||||||
|
Loading…
Reference in New Issue
Block a user