diff --git a/ui/components/SettingsDialog.tsx b/ui/components/SettingsDialog.tsx index 34ef26c..716dd7d 100644 --- a/ui/components/SettingsDialog.tsx +++ b/ui/components/SettingsDialog.tsx @@ -128,7 +128,9 @@ const SettingsDialog = ({ const chatModel = localStorage.getItem('chatModel') || (data.chatModelProviders && - data.chatModelProviders[chatModelProvider]?.[0].name) || + data.chatModelProviders[chatModelProvider]?.length > 0 + ? data.chatModelProviders[chatModelProvider][0].name + : undefined) || ''; const embeddingModelProvider = localStorage.getItem('embeddingModelProvider') ||