mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 13:40:55 +00:00
fix: model import
This commit is contained in:
parent
7f8be4a709
commit
37c87e3a14
@ -6,7 +6,7 @@
|
||||
import { onMount, getContext } from 'svelte';
|
||||
|
||||
import { WEBUI_NAME, modelfiles, models, settings, user } from '$lib/stores';
|
||||
import { addNewModel, deleteModelById, getModelInfos } from '$lib/apis/models';
|
||||
import { addNewModel, deleteModelById, getModelInfos, updateModelById } from '$lib/apis/models';
|
||||
|
||||
import { deleteModel } from '$lib/apis/ollama';
|
||||
import { goto } from '$app/navigation';
|
||||
@ -307,7 +307,7 @@
|
||||
|
||||
for (const model of savedModels) {
|
||||
if (model?.info ?? false) {
|
||||
await addNewModel(localStorage.token, model.info).catch((error) => {
|
||||
await updateModelById(localStorage.token, model.id, model.info).catch((error) => {
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user