diff --git a/src/lib/components/workspace/Models.svelte b/src/lib/components/workspace/Models.svelte index 3bc96b541..f37dd5cc3 100644 --- a/src/lib/components/workspace/Models.svelte +++ b/src/lib/components/workspace/Models.svelte @@ -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; }); }