fix: wrong selected model ref (#1638)

This commit is contained in:
Louis 2024-01-17 11:38:22 +07:00 committed by GitHub
parent f4f861d0e9
commit 246b12e54f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,7 +50,7 @@ export default function DropdownListSidebar() {
const { recommendedModel, downloadedModels } = useRecommendedModel() const { recommendedModel, downloadedModels } = useRecommendedModel()
const selectedName = const selectedName =
downloadedModels.filter((x) => x.id === selected?.id)[0]?.name ?? '' downloadedModels.filter((x) => x.id === selectedModel?.id)[0]?.name ?? ''
/** /**
* Default value for max_tokens and ctx_len * Default value for max_tokens and ctx_len
* Its to avoid OOM issue since a model can set a big number for these settings * Its to avoid OOM issue since a model can set a big number for these settings