mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
Fix: fixed issue that rag_config is overwritten with knowledge name change
This commit is contained in:
parent
bedf27f575
commit
749125c09a
@ -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) => {
|
||||
|
@ -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}`);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user