Fix: Adjusted logic to handle intialization of individual rag config right

This commit is contained in:
Maytown 2025-05-12 12:48:44 +02:00
parent 0d2eefd83d
commit 171c18cff8

View File

@ -229,13 +229,6 @@
return;
}
if (!RAGConfig.BYPASS_EMBEDDING_AND_RETRIEVAL) {
await embeddingModelUpdateHandler();
if (RAGConfig.ENABLE_RAG_HYBRID_SEARCH) {
await rerankingModelUpdateHandler();
}
}
}
const res = await createNewKnowledge(localStorage.token,
@ -252,7 +245,15 @@
knowledge.set(await getKnowledgeBases(localStorage.token));
goto(`/workspace/knowledge/${res.id}`);
}
if (enableIndividualRagConfig) {
if (!RAGConfig.BYPASS_EMBEDDING_AND_RETRIEVAL) {
await embeddingModelUpdateHandler();
if (RAGConfig.ENABLE_RAG_HYBRID_SEARCH) {
await rerankingModelUpdateHandler();
}
}
}
loading = false;
};