mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac: admin model setting include ollama info
This commit is contained in:
parent
db6858582f
commit
9525d4279c
@ -61,8 +61,10 @@
|
|||||||
return workspaceModel;
|
return workspaceModel;
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
|
...m,
|
||||||
id: m.id,
|
id: m.id,
|
||||||
name: m.name,
|
name: m.name,
|
||||||
|
|
||||||
is_active: true
|
is_active: true
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -178,14 +180,26 @@
|
|||||||
|
|
||||||
<div class=" flex-1 self-center {(model?.is_active ?? true) ? '' : 'text-gray-500'}">
|
<div class=" flex-1 self-center {(model?.is_active ?? true) ? '' : 'text-gray-500'}">
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={marked.parse(model?.meta?.description ?? model.id)}
|
content={marked.parse(
|
||||||
|
!!model?.meta?.description
|
||||||
|
? model?.meta?.description
|
||||||
|
: model?.ollama?.digest
|
||||||
|
? `${model.id} (${model?.ollama?.digest})`
|
||||||
|
: model.id
|
||||||
|
)}
|
||||||
className=" w-fit"
|
className=" w-fit"
|
||||||
placement="top-start"
|
placement="top-start"
|
||||||
>
|
>
|
||||||
<div class=" font-semibold line-clamp-1">{model.name}</div>
|
<div class=" font-semibold line-clamp-1">{model.name}</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<div class=" text-xs overflow-hidden text-ellipsis line-clamp-1 text-gray-500">
|
<div class=" text-xs overflow-hidden text-ellipsis line-clamp-1 text-gray-500">
|
||||||
{model?.meta?.description ?? model.id}
|
<span class=" line-clamp-1">
|
||||||
|
{!!model?.meta?.description
|
||||||
|
? model?.meta?.description
|
||||||
|
: model?.ollama?.digest
|
||||||
|
? `${model.id} (${model?.ollama?.digest})`
|
||||||
|
: model.id}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user