From f7f2793bc2a8e3aaecff05aa5ff2ec201a8d840c Mon Sep 17 00:00:00 2001 From: H0llyW00dzZ Date: Tue, 14 Nov 2023 15:44:43 +0700 Subject: [PATCH] Refactor Summarize Logic [+] refactor(chat.ts): simplify getSummarizeModel function Note : Previously it was only gpt, now any custom models/ai --- app/store/chat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/store/chat.ts b/app/store/chat.ts index 1e4a08cd3f2..f6372260729 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -83,7 +83,7 @@ function createEmptySession(): ChatSession { // fix known issue where summarize is not using the current model selected function getSummarizeModel(currentModel: string, modelConfig: ModelConfig) { // should be depends of user selected - return currentModel.startsWith("gpt") ? modelConfig.model : currentModel; + return currentModel ? modelConfig.model : currentModel; } function countMessages(msgs: ChatMessage[]) {