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;
|
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) => {
|
||||||
|
@ -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}`);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user