diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte index a220bd4eb..84e95d39a 100644 --- a/src/lib/components/chat/SettingsModal.svelte +++ b/src/lib/components/chat/SettingsModal.svelte @@ -74,17 +74,20 @@ let deleteModelTag = ''; + // External + + let OPENAI_API_KEY = ''; + let OPENAI_API_BASE_URL = ''; + // Addons let titleAutoGenerate = true; let speechAutoSend = false; let responseAutoCopy = false; let gravatarEmail = ''; - let OPENAI_API_KEY = ''; - let OPENAI_API_BASE_URL = ''; + let titleAutoGenerateModel = ''; // Chats - let importFiles; let showDeleteConfirm = false; @@ -656,13 +659,14 @@ options = { ...options, ...settings.options }; options.stop = (settings?.options?.stop ?? []).join(','); + OPENAI_API_KEY = settings.OPENAI_API_KEY ?? ''; + OPENAI_API_BASE_URL = settings.OPENAI_API_BASE_URL ?? 'https://api.openai.com/v1'; + titleAutoGenerate = settings.titleAutoGenerate ?? true; speechAutoSend = settings.speechAutoSend ?? false; responseAutoCopy = settings.responseAutoCopy ?? false; - + titleAutoGenerateModel = settings.titleAutoGenerateModel ?? ''; gravatarEmail = settings.gravatarEmail ?? ''; - OPENAI_API_KEY = settings.OPENAI_API_KEY ?? ''; - OPENAI_API_BASE_URL = settings.OPENAI_API_BASE_URL ?? 'https://api.openai.com/v1'; authEnabled = settings.authHeader !== undefined ? true : false; if (authEnabled) { @@ -1548,10 +1552,6 @@
{ - saveSettings({ - gravatarEmail: gravatarEmail !== '' ? gravatarEmail : undefined, - gravatarUrl: gravatarEmail !== '' ? getGravatarURL(gravatarEmail) : undefined - }); show = false; }} > @@ -1561,7 +1561,7 @@
-
Title Auto Generation
+
Title Auto-Generation
+
+
+ +
diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index 309201407..9638861be 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -597,7 +597,7 @@ const title = await generateTitle( $settings?.API_BASE_URL ?? OLLAMA_API_BASE_URL, localStorage.token, - selectedModels[0], + $settings?.titleAutoGenerateModel ?? selectedModels[0], userPrompt );