This commit is contained in:
Hk-Gosuto
2024-02-20 17:16:20 +08:00
parent 4e5bd62477
commit 3974f0d477
4 changed files with 11 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ import {
DEFAULT_INPUT_TEMPLATE,
DEFAULT_MODELS,
DEFAULT_SYSTEM_TEMPLATE,
GOOGLE_SUMMARIZE_MODEL,
KnowledgeCutOffDate,
ModelProvider,
StoreKey,
@@ -96,6 +97,7 @@ function getSummarizeModel(currentModel: string) {
const model = DEFAULT_MODELS.find((m) => m.name === currentModel);
console.log("model", model);
if (!model) return currentModel;
if (model.provider.providerType === "google") return GOOGLE_SUMMARIZE_MODEL;
// if it is using gpt-* models, force to use 3.5 to summarize
return currentModel.startsWith("gpt") ? SUMMARIZE_MODEL : currentModel;
}