Skip to content

Commit

Permalink
chore: summarization logic regarding Anthropic
Browse files Browse the repository at this point in the history
  • Loading branch information
Illusion2-1 committed Apr 18, 2024
1 parent 9b2cb1e commit 8f488fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ Latex block: $$e=mc^2$$

export const SUMMARIZE_MODEL = "gpt-3.5-turbo";
export const GEMINI_SUMMARIZE_MODEL = "gemini-pro";
export const ANTHROPIC_SUMMARIZE_MODEL = "claude-3-haiku-20240307"

export const KnowledgeCutOffDate: Record<string, string> = {
default: "2021-09",
Expand Down
4 changes: 4 additions & 0 deletions app/store/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
StoreKey,
SUMMARIZE_MODEL,
GEMINI_SUMMARIZE_MODEL,
ANTHROPIC_SUMMARIZE_MODEL,
} from "../constant";
import { ClientApi, RequestMessage, MultimodalContent } from "../client/api";
import { ChatControllerPool } from "../client/controller";
Expand Down Expand Up @@ -92,6 +93,9 @@ function getSummarizeModel(currentModel: string) {
if (currentModel.startsWith("gemini-pro")) {
return GEMINI_SUMMARIZE_MODEL;
}
if (currentModel.startsWith("claude")){
return ANTHROPIC_SUMMARIZE_MODEL;
}
return currentModel;
}

Expand Down

0 comments on commit 8f488fe

Please sign in to comment.