mirror of
https://github.com/open-webui/open-webui
synced 2024-11-28 23:13:30 +00:00
fix: model params
This commit is contained in:
parent
b124cd4ac5
commit
475e09be45
@ -79,6 +79,12 @@
|
||||
info.meta.capabilities = capabilities;
|
||||
info.params.stop = params.stop ? params.stop.split(',').filter((s) => s.trim()) : null;
|
||||
|
||||
Object.keys(info.params).forEach((key) => {
|
||||
if (info.params[key] === '' || info.params[key] === null) {
|
||||
delete info.params[key];
|
||||
}
|
||||
});
|
||||
|
||||
if ($models.find((m) => m.id === info.id)) {
|
||||
toast.error(
|
||||
`Error: A model with the ID '${info.id}' already exists. Please select a different ID to proceed.`
|
||||
|
@ -67,6 +67,12 @@
|
||||
info.meta.capabilities = capabilities;
|
||||
info.params.stop = params.stop ? params.stop.split(',').filter((s) => s.trim()) : null;
|
||||
|
||||
Object.keys(info.params).forEach((key) => {
|
||||
if (info.params[key] === '' || info.params[key] === null) {
|
||||
delete info.params[key];
|
||||
}
|
||||
});
|
||||
|
||||
const res = await updateModelById(localStorage.token, info.id, info);
|
||||
|
||||
if (res) {
|
||||
|
Loading…
Reference in New Issue
Block a user