fix: inconsistent models from dropdown and hub

This commit is contained in:
Louis 2024-10-30 16:05:13 +07:00
parent 8c759676d9
commit 2a0d87a393
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2
3 changed files with 14 additions and 4 deletions

View File

@ -509,7 +509,12 @@ const ModelDropdown = ({
<ul className="pb-2">
{filteredDownloadedModels
.filter((x) => x.engine === engine)
.filter(
(x) =>
x.engine === engine ||
(x.engine === InferenceEngine.nitro &&
engine === InferenceEngine.cortex_llamacpp)
)
.filter((y) => {
if (isLocalEngine(y.engine) && !searchText.length) {
return downloadedModels.find((c) => c.id === y.id)

View File

@ -54,14 +54,14 @@ const MyModelList = ({ model }: Props) => {
<h6
className={twMerge(
'font-medium lg:line-clamp-1 lg:min-w-[280px] lg:max-w-[280px]',
model.engine !== InferenceEngine.nitro &&
!isLocalEngine(model.engine) &&
'max-w-none text-[hsla(var(--text-secondary))]'
)}
title={model.name}
>
{model.name}
</h6>
{model.engine === InferenceEngine.nitro && (
{!isLocalEngine(model.engine) && (
<div className="flex gap-x-8">
<p
className="line-clamp-1 text-[hsla(var(--text-secondary))] lg:min-w-[160px] lg:max-w-[160px] xl:max-w-none"

View File

@ -250,7 +250,12 @@ const MyModels = () => {
<div className="mt-2">
{filteredDownloadedModels
? filteredDownloadedModels
.filter((x) => x.engine === engine)
.filter(
(x) =>
x.engine === engine ||
(x.engine === InferenceEngine.nitro &&
engine === InferenceEngine.cortex_llamacpp)
)
.map((model) => {
if (!showModel) return null
return (