feat: unified /models endpoint

This commit is contained in:
Timothy J. Baek
2024-05-24 01:40:48 -07:00
parent 4d57e08b38
commit 110ed67468
16 changed files with 166 additions and 170 deletions

View File

@@ -21,10 +21,8 @@
let filteredModels = [];
$: filteredModels = $models
.filter((p) =>
(p.custom_info?.name ?? p.name).includes(prompt.split(' ')?.at(0)?.substring(1) ?? '')
)
.sort((a, b) => (a.custom_info?.name ?? a.name).localeCompare(b.custom_info?.name ?? b.name));
.filter((p) => p.name.includes(prompt.split(' ')?.at(0)?.substring(1) ?? ''))
.sort((a, b) => a.name.localeCompare(b.name));
$: if (prompt) {
selectedIdx = 0;
@@ -158,7 +156,7 @@
on:focus={() => {}}
>
<div class=" font-medium text-black line-clamp-1">
{model.custom_info?.name ?? model.name}
{model.name}
</div>
<!-- <div class=" text-xs text-gray-600 line-clamp-1">