From ec7c5a3f070d5ce2433cdd1786c3052856cdd961 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 5 Jun 2024 09:14:15 -0700 Subject: [PATCH] refac: set default model from interface settings --- .../components/chat/Settings/Interface.svelte | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/Settings/Interface.svelte b/src/lib/components/chat/Settings/Interface.svelte index e231981e8..009b2ecf3 100644 --- a/src/lib/components/chat/Settings/Interface.svelte +++ b/src/lib/components/chat/Settings/Interface.svelte @@ -21,6 +21,7 @@ let splitLargeChunks = false; // Interface + let defaultModelId = ''; let promptSuggestions = []; let showUsername = false; let chatBubble = true; @@ -96,7 +97,8 @@ modelExternal: titleAutoGenerateModelExternal !== '' ? titleAutoGenerateModelExternal : undefined, prompt: titleGenerationPrompt ? titleGenerationPrompt : undefined - } + }, + models: [defaultModelId] }); }; @@ -117,6 +119,8 @@ widescreenMode = $settings.widescreenMode ?? false; splitLargeChunks = $settings.splitLargeChunks ?? false; chatDirection = $settings.chatDirection ?? 'LTR'; + + defaultModelId = ($settings?.models ?? ['']).at(0); }); @@ -278,7 +282,30 @@ -
+
+ +
+
+
+
{$i18n.t('Default Model')}
+
+
+ +
+ +
+
+ +