From 5d6cee0c581c2d6edba82ab1617ff76b22bf4e9d Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 25 Mar 2024 14:04:46 -0700 Subject: [PATCH] feat: model selector w/ more info --- src/lib/components/chat/ModelSelector.svelte | 3 +- .../chat/ModelSelector/Selector.svelte | 33 ++++++++++++++++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/ModelSelector.svelte b/src/lib/components/chat/ModelSelector.svelte index b0bb5e870..b52929437 100644 --- a/src/lib/components/chat/ModelSelector.svelte +++ b/src/lib/components/chat/ModelSelector.svelte @@ -44,8 +44,7 @@ .filter((model) => model.name !== 'hr') .map((model) => ({ value: model.id, - label: - model.name + `${model.size ? ` (${(model.size / 1024 ** 3).toFixed(1)}GB)` : ''}`, + label: model.name, info: model }))} bind:value={selectedModel} diff --git a/src/lib/components/chat/ModelSelector/Selector.svelte b/src/lib/components/chat/ModelSelector/Selector.svelte index a5e8b12d5..c4662bc17 100644 --- a/src/lib/components/chat/ModelSelector/Selector.svelte +++ b/src/lib/components/chat/ModelSelector/Selector.svelte @@ -222,8 +222,14 @@
{item.label} + + {item.info?.details?.parameter_size ?? ''}
+ + {#if item.info.external}
@@ -231,7 +237,7 @@ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" - class="w-4 h-4" + class="size-3" >
+ {:else} + +
+ + + +
+
{/if}