feat: allow model config via config.json

This commit is contained in:
Jun Siang Cheah
2024-05-09 20:25:30 +08:00
parent df3675aaf7
commit e76a444ed9
21 changed files with 364 additions and 119 deletions

View File

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