fix: switch model caused app crash (#1597)
This commit is contained in:
parent
aaa02b53fc
commit
81ad936990
@ -77,6 +77,8 @@ export default function DropdownListSidebar() {
|
||||
|
||||
const { recommendedModel, downloadedModels } = useRecommendedModel()
|
||||
|
||||
const selectedName =
|
||||
downloadedModels.filter((x) => x.id === selected?.id)[0]?.name ?? ''
|
||||
/**
|
||||
* Default value for max_tokens and ctx_len
|
||||
* Its to avoid OOM issue since a model can set a big number for these settings
|
||||
@ -208,7 +210,7 @@ export default function DropdownListSidebar() {
|
||||
<Select value={selected?.id} onValueChange={onValueSelected}>
|
||||
<SelectTrigger className="w-full">
|
||||
<SelectValue placeholder="Choose model to start">
|
||||
{downloadedModels.filter((x) => x.id === selected?.id)[0]?.name}
|
||||
{selectedName}
|
||||
</SelectValue>
|
||||
</SelectTrigger>
|
||||
<SelectContent className="right-2 block w-full min-w-[450px] pr-0">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user