fix: only log a reranking model change when the request carries one (#29922)

This commit is contained in:
G30
2026-09-12 16:04:14 -05:00
committed by GitHub
parent a910b0d8f6
commit ee4834e299
+2 -1
View File
@@ -1215,7 +1215,8 @@ async def update_rag_config(request: Request, form_data: ConfigForm, user=Depend
else config.RAG_RERANKING_BATCH_SIZE
)
log.info('Updating reranking model: %s to %s', config.RAG_RERANKING_MODEL, form_data.RAG_RERANKING_MODEL)
if form_data.RAG_RERANKING_MODEL is not None:
log.info('Updating reranking model: %s to %s', config.RAG_RERANKING_MODEL, form_data.RAG_RERANKING_MODEL)
try:
config.RAG_RERANKING_MODEL = (
form_data.RAG_RERANKING_MODEL if form_data.RAG_RERANKING_MODEL is not None else config.RAG_RERANKING_MODEL