forked from open-webui/open-webui
fix: duplicate modelfile issue
This commit is contained in:
parent
a25761a423
commit
3379fef26e
1 changed files with 4 additions and 1 deletions
|
@ -93,7 +93,10 @@ SYSTEM """${system}"""`.replace(/^\s*\n/gm, '');
|
||||||
};
|
};
|
||||||
|
|
||||||
const saveModelfile = async (modelfile) => {
|
const saveModelfile = async (modelfile) => {
|
||||||
await modelfiles.set([...$modelfiles, modelfile]);
|
await modelfiles.set([
|
||||||
|
...$modelfiles.filter((m) => m.tagName !== modelfile.tagName),
|
||||||
|
modelfile
|
||||||
|
]);
|
||||||
localStorage.setItem('modelfiles', JSON.stringify($modelfiles));
|
localStorage.setItem('modelfiles', JSON.stringify($modelfiles));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue