Commit 331941db authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

feat: show desc in model selector

parent 1fb4c602
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<div in:fade={{ duration: 200, delay: 200 }}> <div in:fade={{ duration: 200, delay: 200 }}>
{#if models[selectedModelIdx]?.info} {#if models[selectedModelIdx]?.info}
<div class="mt-0.5 text-base font-normal text-gray-500 dark:text-gray-400"> <div class="mt-0.5 text-base font-normal text-gray-500 dark:text-gray-400 line-clamp-3">
{models[selectedModelIdx]?.info?.meta?.description} {models[selectedModelIdx]?.info?.meta?.description}
</div> </div>
{#if models[selectedModelIdx]?.info?.meta?.user} {#if models[selectedModelIdx]?.info?.meta?.user}
......
...@@ -246,13 +246,29 @@ ...@@ -246,13 +246,29 @@
}} }}
> >
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<div class="line-clamp-1"> <div class="flex items-center">
{item.label} <div class="line-clamp-1">
{item.label}
{#if item.model.owned_by === 'ollama'} </div>
<span class=" text-xs font-medium text-gray-600 dark:text-gray-400" {#if item.model.owned_by === 'ollama' && (item.model.ollama?.details?.parameter_size ?? '') !== ''}
>{item.model.ollama?.details?.parameter_size ?? ''}</span <div class="flex ml-1 items-center">
> <Tooltip
content={`${
item.model.ollama?.details?.quantization_level
? item.model.ollama?.details?.quantization_level + ' '
: ''
}${
item.model.ollama?.size
? `(${(item.model.ollama?.size / 1024 ** 3).toFixed(1)}GB)`
: ''
}`}
className="self-end"
>
<span class=" text-xs font-medium text-gray-600 dark:text-gray-400"
>{item.model.ollama?.details?.parameter_size ?? ''}</span
>
</Tooltip>
</div>
{/if} {/if}
</div> </div>
...@@ -280,40 +296,12 @@ ...@@ -280,40 +296,12 @@
</svg> </svg>
</div> </div>
</Tooltip> </Tooltip>
{:else if item.model.owned_by === 'ollama'}
<Tooltip
content={`${
item.model.ollama?.details?.quantization_level
? item.model.ollama?.details?.quantization_level + ' '
: ''
}${
item.model.ollama?.size
? `(${(item.model.ollama?.size / 1024 ** 3).toFixed(1)}GB)`
: ''
}`}
>
<div class="">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-4 h-4"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"
/>
</svg>
</div>
</Tooltip>
{/if} {/if}
{#if item.info?.custom_info?.meta.description}
{#if item.model?.info?.meta?.description}
<Tooltip <Tooltip
content={`${sanitizeResponseContent( content={`${sanitizeResponseContent(
item.info.custom_info?.meta.description item.model?.info?.meta?.description
).replaceAll('\n', '<br>')}`} ).replaceAll('\n', '<br>')}`}
> >
<div class=""> <div class="">
...@@ -328,13 +316,14 @@ ...@@ -328,13 +316,14 @@
<path <path
stroke-linecap="round" stroke-linecap="round"
stroke-linejoin="round" stroke-linejoin="round"
d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"
/> />
</svg> </svg>
</div> </div>
</Tooltip> </Tooltip>
{/if} {/if}
</div> </div>
{#if value === item.value} {#if value === item.value}
<div class="ml-auto"> <div class="ml-auto">
<Check /> <Check />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment