From bd84753c6b9a9c4a60c30fcb6e7ac648ed5fca85 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 9 Mar 2024 21:52:19 -0800 Subject: [PATCH] feat: title auto-generate for openai apis --- src/routes/(app)/+page.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index bb3668dc..07fcc176 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -675,7 +675,12 @@ if (messages.length == 2) { window.history.replaceState(history.state, '', `/c/${_chatId}`); - await setChatTitle(_chatId, userPrompt); + + if ($settings?.titleAutoGenerateModel) { + await generateChatTitle(_chatId, userPrompt); + } else { + await setChatTitle(_chatId, userPrompt); + } } };