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;
data?: object;
access_control?: null | object;
rag_config?: object;
};
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,
description: form?.description ? form.description : 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) => {

View File

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