Skip to content

Commit 67338ff

Browse files
committed
add KnowledgeCutOffDate for deepseek
1 parent 7380c8a commit 67338ff

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/api/deepseek.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import { prettyObject } from "@/app/utils/format";
99
import { NextRequest, NextResponse } from "next/server";
1010
import { auth } from "@/app/api/auth";
11-
import { isModelAvailableInServer } from "@/app/utils/model";
11+
import { isModelNotavailableInServer } from "@/app/utils/model";
1212

1313
const serverConfig = getServerSideConfig();
1414

@@ -88,7 +88,7 @@ async function request(req: NextRequest) {
8888

8989
// not undefined and is false
9090
if (
91-
isModelAvailableInServer(
91+
isModelNotavailableInServer(
9292
serverConfig.customModels,
9393
jsonBody?.model as string,
9494
ServiceProvider.Moonshot as string,

app/constant.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ export const KnowledgeCutOffDate: Record<string, string> = {
287287
// it's now easier to add "KnowledgeCutOffDate" instead of stupid hardcoding it, as was done previously.
288288
"gemini-pro": "2023-12",
289289
"gemini-pro-vision": "2023-12",
290+
"deepseek-chat": "2024-07",
291+
"deepseek-coder": "2024-07",
290292
};
291293

292294
export const DEFAULT_TTS_ENGINE = "OpenAI-TTS";

0 commit comments

Comments
 (0)