mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	add KnowledgeCutOffDate for deepseek
This commit is contained in:
		@@ -8,7 +8,7 @@ import {
 | 
			
		||||
import { prettyObject } from "@/app/utils/format";
 | 
			
		||||
import { NextRequest, NextResponse } from "next/server";
 | 
			
		||||
import { auth } from "@/app/api/auth";
 | 
			
		||||
import { isModelAvailableInServer } from "@/app/utils/model";
 | 
			
		||||
import { isModelNotavailableInServer } from "@/app/utils/model";
 | 
			
		||||
 | 
			
		||||
const serverConfig = getServerSideConfig();
 | 
			
		||||
 | 
			
		||||
@@ -88,7 +88,7 @@ async function request(req: NextRequest) {
 | 
			
		||||
 | 
			
		||||
      // not undefined and is false
 | 
			
		||||
      if (
 | 
			
		||||
        isModelAvailableInServer(
 | 
			
		||||
        isModelNotavailableInServer(
 | 
			
		||||
          serverConfig.customModels,
 | 
			
		||||
          jsonBody?.model as string,
 | 
			
		||||
          ServiceProvider.Moonshot as string,
 | 
			
		||||
 
 | 
			
		||||
@@ -287,6 +287,8 @@ export const KnowledgeCutOffDate: Record<string, string> = {
 | 
			
		||||
  // it's now easier to add "KnowledgeCutOffDate" instead of stupid hardcoding it, as was done previously.
 | 
			
		||||
  "gemini-pro": "2023-12",
 | 
			
		||||
  "gemini-pro-vision": "2023-12",
 | 
			
		||||
  "deepseek-chat": "2024-07",
 | 
			
		||||
  "deepseek-coder": "2024-07",
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export const DEFAULT_TTS_ENGINE = "OpenAI-TTS";
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user