From 37c87e3a145b01a339fd12c03042953e918609cc Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 29 May 2024 11:12:09 -0700 Subject: [PATCH] fix: model import --- src/lib/components/workspace/Models.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }); }