From 5f46413d6b31b466115e7ab2aff7589e0ca31900 Mon Sep 17 00:00:00 2001 From: Chenglong Wang Date: Thu, 15 Aug 2024 16:30:08 +0800 Subject: [PATCH] Update chat.ts for comments. --- app/store/chat.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/store/chat.ts b/app/store/chat.ts index efe36e656..046c4bd16 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -92,7 +92,6 @@ function createEmptySession(): ChatSession { } function getSummarizeModel(currentModel: string) { - // if it is using gpt-* models, force to use 4o-mini to summarize const configStore = useAppConfig.getState(); const accessStore = useAccessStore.getState(); const allModel = collectModelsWithDefaultModel( @@ -100,7 +99,7 @@ function getSummarizeModel(currentModel: string) { [configStore.customModels, accessStore.customModels].join(","), accessStore.defaultModel, ); - + // if it is using gpt-* models, force to use 4o-mini to summarize if (currentModel.startsWith("gpt")) { const summarizeModel = allModel.find( (m) => m.name === SUMMARIZE_MODEL && m.available, @@ -113,6 +112,7 @@ function getSummarizeModel(currentModel: string) { ); return summarizeModel?.name ?? currentModel; } + // if it is using claude-* models, use claude-3-haiku-20240307 to summarize if (currentModel.startsWith("claude")) { const summarizeModel = allModel.find( (m) => m.name === CLAUDE_SUMMARIZE_MODEL && m.available,