From 5342063e241be99c7741f045a9a23ca8c5050f87 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 8 Jun 2024 19:21:37 -0700 Subject: [PATCH] fix: import model --- src/lib/components/chat/ModelSelector/Selector.svelte | 2 +- src/routes/(app)/workspace/models/create/+page.svelte | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/ModelSelector/Selector.svelte b/src/lib/components/chat/ModelSelector/Selector.svelte index dad1fa512..5cdeadac2 100644 --- a/src/lib/components/chat/ModelSelector/Selector.svelte +++ b/src/lib/components/chat/ModelSelector/Selector.svelte @@ -265,7 +265,7 @@ {/if}
-
+
{item.label}
diff --git a/src/routes/(app)/workspace/models/create/+page.svelte b/src/routes/(app)/workspace/models/create/+page.svelte index 532b31dd7..b373fcc4b 100644 --- a/src/routes/(app)/workspace/models/create/+page.svelte +++ b/src/routes/(app)/workspace/models/create/+page.svelte @@ -127,12 +127,16 @@ if (model.info.base_model_id) { const base_model = $models .filter((m) => !m?.preset) - .find((m) => m.id === model.info.base_model_id); + .find((m) => + [model.info.base_model_id, `${model.info.base_model_id}:latest`].includes(m.id) + ); console.log('base_model', base_model); if (!base_model) { model.info.base_model_id = null; + } else if ($models.find((m) => m.id === `${model.info.base_model_id}:latest`)) { + model.info.base_model_id = `${model.info.base_model_id}:latest`; } }