From 81ad9369904cbf664079cc00fe3e0eb3ed43ad9c Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 15 Jan 2024 15:45:58 +0700 Subject: [PATCH] fix: switch model caused app crash (#1597) --- web/containers/DropdownListSidebar/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/containers/DropdownListSidebar/index.tsx b/web/containers/DropdownListSidebar/index.tsx index 725e34ca0..e2b1abb3e 100644 --- a/web/containers/DropdownListSidebar/index.tsx +++ b/web/containers/DropdownListSidebar/index.tsx @@ -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() {