From ad31bd51fd7fe203edb152c1510274f97ae7d455 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 9 Oct 2024 12:36:52 -0700 Subject: [PATCH] refac --- src/lib/components/chat/Chat.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 72354cc48..284d4bc49 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -427,7 +427,11 @@ console.log($config?.default_models.split(',') ?? ''); selectedModels = $config?.default_models.split(','); } else { - selectedModels = ['']; + if ($models.length > 0) { + selectedModels = [$models[0].id]; + } else { + selectedModels = ['']; + } } if ($page.url.searchParams.get('youtube')) {