feat: init support for deepseek

This commit is contained in:
Fred
2024-05-15 14:47:43 +08:00
parent 3513c6801e
commit 27ac18d9d7
8 changed files with 54 additions and 25 deletions

View File

@@ -1,3 +1,5 @@
import { Chat } from "./components/chat";
export const OWNER = "Yidadaa";
export const REPO = "ChatGPT-Next-Web";
export const REPO_URL = `https://github.com/${OWNER}/${REPO}`;
@@ -70,12 +72,14 @@ export enum ServiceProvider {
Azure = "Azure",
Google = "Google",
Anthropic = "Anthropic",
DeepSeek = "DeepSeek",
}
export enum ModelProvider {
GPT = "GPT",
GeminiPro = "GeminiPro",
Claude = "Claude",
Deepseek = "DeepSeek",
}
export const Anthropic = {
@@ -136,16 +140,11 @@ export const KnowledgeCutOffDate: Record<string, string> = {
const openaiModels = [
"gpt-3.5-turbo",
"gpt-3.5-turbo-1106",
"gpt-3.5-turbo-0125",
"gpt-4",
"gpt-4-0613",
"gpt-4-32k",
"gpt-4-32k-0613",
"gpt-4-turbo",
"gpt-4-turbo-preview",
"gpt-4-vision-preview",
"gpt-4-turbo-2024-04-09",
];
const googleModels = [
@@ -163,6 +162,8 @@ const anthropicModels = [
"claude-3-haiku-20240307",
];
const deepseekModels = ["deepseek-chat"];
export const DEFAULT_MODELS = [
...openaiModels.map((name) => ({
name,
@@ -191,6 +192,15 @@ export const DEFAULT_MODELS = [
providerType: "anthropic",
},
})),
...deepseekModels.map((name) => ({
name,
available: true,
provider: {
id: "deepseek",
providerName: "DeepSeek",
providerType: "deepseek",
},
})),
] as const;
export const CHAT_PAGE_SIZE = 15;