fix: model import

This commit is contained in:
Timothy J. Baek 2024-05-29 11:12:09 -07:00
parent 7f8be4a709
commit 37c87e3a14

View File

@ -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;
});
}