Fix: fixed issue that rag_config is overwritten with knowledge name change

This commit is contained in:
weberm1 2025-06-04 11:06:48 +02:00
parent bedf27f575
commit 749125c09a
2 changed files with 5 additions and 2 deletions

View File

@ -139,6 +139,7 @@ type KnowledgeUpdateForm = {
description?: string; description?: string;
data?: object; data?: object;
access_control?: null | object; access_control?: null | object;
rag_config?: object;
}; };
export const updateKnowledgeById = async (token: string, id: string, form: KnowledgeUpdateForm) => { export const updateKnowledgeById = async (token: string, id: string, form: KnowledgeUpdateForm) => {
@ -155,7 +156,8 @@ export const updateKnowledgeById = async (token: string, id: string, form: Knowl
name: form?.name ? form.name : undefined, name: form?.name ? form.name : undefined,
description: form?.description ? form.description : undefined, description: form?.description ? form.description : undefined,
data: form?.data ? form.data : undefined, data: form?.data ? form.data : undefined,
access_control: form.access_control access_control: form.access_control,
rag_config: form?.rag_config ? form.rag_config : undefined
}) })
}) })
.then(async (res) => { .then(async (res) => {

View File

@ -443,7 +443,8 @@
...knowledge, ...knowledge,
name: knowledge.name, name: knowledge.name,
description: knowledge.description, description: knowledge.description,
access_control: knowledge.access_control access_control: knowledge.access_control,
rag_config: knowledge.rag_config
}).catch((e) => { }).catch((e) => {
toast.error(`${e}`); toast.error(`${e}`);
}); });