소스 검색

feat: title auto-generate for openai apis

Timothy J. Baek 1 년 전
부모
커밋
bd84753c6b
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      src/routes/(app)/+page.svelte

+ 6 - 1
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);
+			}
 		}
 	};