Files
hack/tools/scripts/llm-key-hunter/results/_cache/content/chokiproai_chatgpt-plugins.json
T

1 line
473 KiB
JSON

{"repo": "chokiproai/chatgpt-plugins", "files": {"app/constant.ts": {"37e0c31fe0b094f1b4d69b46603431645de68a35": {"t": 1785746027.04254, "n": 18755, "h": "d0900f5c5b11605a", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\nexport const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5;\nexport const REQUEST_TIMEOUT_MS_FOR_IMAGE_GENERATION = REQUEST_TIMEOUT_MS * 5;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4.1\": \"2024-06\",\n \"gpt-4.1-2025-04-14\": \"2024-06\",\n \"gpt-4.1-mini\": \"2024-06\",\n \"gpt-4.1-mini-2025-04-14\": \"2024-06\",\n \"gpt-4.1-nano\": \"2024-06\",\n \"gpt-4.1-nano-2025-04-14\": \"2024-06\",\n \"gpt-4.5-preview\": \"2023-10\",\n \"gpt-4.5-preview-2025-02-27\": \"2023-10\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n o1: \"2023-10\",\n \"o1-pro\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /gpt-4o-mini/,\n /gpt-4\\.1/,\n /gpt-4\\.1-mini/,\n /gpt-4\\.1-nano/,\n /gpt-4\\.5-preview/,\n /gpt-4\\.5-preview-2025-02-27/,\n /gpt-4\\.1/,\n /claude/,\n /gemini-(.*)/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /^gpt-image-1$/,\n /glm-4v/,\n /vl/i,\n /o4-mini/,\n /o1/,\n /o3/,\n /o4/,\n /gpt-5/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-2/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n // Gpt-3 series\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n // Gpt-4 series\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4.1\",\n \"gpt-4.1-2025-04-14\",\n \"gpt-4.1-mini\",\n \"gpt-4.1-mini-2025-04-14\",\n \"gpt-4.1-nano\",\n \"gpt-4.1-nano-2025-04-14\",\n \"gpt-4.1-2025-04-14\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n // Gpt-5 series\n \"gpt-5-chat\",\n \"gpt-5-mini\",\n \"gpt-5-nano\",\n \"gpt-5\",\n \"gpt-5-chat-2025-01-01-preview\",\n \"gpt-5-2025-08-07\",\n \"gpt-5-mini-2025-08-07\",\n \"gpt-5-nano-2025-08-07\",\n \"gpt-5-chat-latest\",\n // DALL·E series\n \"dall-e-3\",\n \"gpt-image-1\",\n // o1 + o3 + o4 series\n \"o1-mini\",\n \"o1\",\n \"o1-preview\",\n \"o1-pro\",\n \"o3-mini\",\n \"o3\",\n \"o3-deep-research-2025-06-26\",\n \"o3-deep-research\",\n \"o3-pro-2025-06-10\",\n \"o3-pro\",\n \"o4-mini\",\n \"o4-mini-deep-research-2025-06-26\",\n \"o4-mini-deep-research\",\n];\n\nconst googleModels = [\n // https://ai.google.dev/gemini-api/docs/models/gemini?\n // Gemini 1.5\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n // Gemini 2.0\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite\",\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-2.0-flash-thinking-exp\",\n \"gemini-2.0-flash-thinking-exp-1219\",\n \"gemini-2.0-pro-exp\",\n // https://ai.google.dev/gemini-api/docs/models/experimental-models?\n // Gemini 2.5\n \"gemini-2.5-pro\",\n \"gemini-2.5-flash\",\n \"gemini-2.5-flash-image-preview\",\n \"gemini-2.5-pro-preview-06-05\",\n // Gemini + learnlm\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n];\n\nconst anthropicModels = [\n // claude 2 series\n \"claude-2.0\",\n \"claude-2.1\",\n // claude 3 series\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n // claude 4 series\n \"claude-opus-4-20250514\",\n \"claude-sonnet-4-20250514\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n \"deepseek-v3-241226\",\n \"deepseek-r1-250120\",\n \"deepseek-r1-distill-qwen-7b-250120\",\n \"deepseek-r1-distill-qwen-32b-250120\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";\n"}, "d1b2885d388855a9985b935dbc3774c63b037bec": {"t": 1785758943.6774752, "n": 18755, "h": "d0900f5c5b11605a", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\nexport const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5;\nexport const REQUEST_TIMEOUT_MS_FOR_IMAGE_GENERATION = REQUEST_TIMEOUT_MS * 5;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4.1\": \"2024-06\",\n \"gpt-4.1-2025-04-14\": \"2024-06\",\n \"gpt-4.1-mini\": \"2024-06\",\n \"gpt-4.1-mini-2025-04-14\": \"2024-06\",\n \"gpt-4.1-nano\": \"2024-06\",\n \"gpt-4.1-nano-2025-04-14\": \"2024-06\",\n \"gpt-4.5-preview\": \"2023-10\",\n \"gpt-4.5-preview-2025-02-27\": \"2023-10\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n o1: \"2023-10\",\n \"o1-pro\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /gpt-4o-mini/,\n /gpt-4\\.1/,\n /gpt-4\\.1-mini/,\n /gpt-4\\.1-nano/,\n /gpt-4\\.5-preview/,\n /gpt-4\\.5-preview-2025-02-27/,\n /gpt-4\\.1/,\n /claude/,\n /gemini-(.*)/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /^gpt-image-1$/,\n /glm-4v/,\n /vl/i,\n /o4-mini/,\n /o1/,\n /o3/,\n /o4/,\n /gpt-5/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-2/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n // Gpt-3 series\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n // Gpt-4 series\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4.1\",\n \"gpt-4.1-2025-04-14\",\n \"gpt-4.1-mini\",\n \"gpt-4.1-mini-2025-04-14\",\n \"gpt-4.1-nano\",\n \"gpt-4.1-nano-2025-04-14\",\n \"gpt-4.1-2025-04-14\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n // Gpt-5 series\n \"gpt-5-chat\",\n \"gpt-5-mini\",\n \"gpt-5-nano\",\n \"gpt-5\",\n \"gpt-5-chat-2025-01-01-preview\",\n \"gpt-5-2025-08-07\",\n \"gpt-5-mini-2025-08-07\",\n \"gpt-5-nano-2025-08-07\",\n \"gpt-5-chat-latest\",\n // DALL·E series\n \"dall-e-3\",\n \"gpt-image-1\",\n // o1 + o3 + o4 series\n \"o1-mini\",\n \"o1\",\n \"o1-preview\",\n \"o1-pro\",\n \"o3-mini\",\n \"o3\",\n \"o3-deep-research-2025-06-26\",\n \"o3-deep-research\",\n \"o3-pro-2025-06-10\",\n \"o3-pro\",\n \"o4-mini\",\n \"o4-mini-deep-research-2025-06-26\",\n \"o4-mini-deep-research\",\n];\n\nconst googleModels = [\n // https://ai.google.dev/gemini-api/docs/models/gemini?\n // Gemini 1.5\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n // Gemini 2.0\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite\",\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-2.0-flash-thinking-exp\",\n \"gemini-2.0-flash-thinking-exp-1219\",\n \"gemini-2.0-pro-exp\",\n // https://ai.google.dev/gemini-api/docs/models/experimental-models?\n // Gemini 2.5\n \"gemini-2.5-pro\",\n \"gemini-2.5-flash\",\n \"gemini-2.5-flash-image-preview\",\n \"gemini-2.5-pro-preview-06-05\",\n // Gemini + learnlm\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n];\n\nconst anthropicModels = [\n // claude 2 series\n \"claude-2.0\",\n \"claude-2.1\",\n // claude 3 series\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n // claude 4 series\n \"claude-opus-4-20250514\",\n \"claude-sonnet-4-20250514\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n \"deepseek-v3-241226\",\n \"deepseek-r1-250120\",\n \"deepseek-r1-distill-qwen-7b-250120\",\n \"deepseek-r1-distill-qwen-32b-250120\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";\n"}, "4fb9a28c67b0bf8c21c2122d5060964134c44d2d": {"t": 1785758944.9953003, "n": 18168, "h": "44fa6d36433c6c1e", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\nexport const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5;\nexport const REQUEST_TIMEOUT_MS_FOR_IMAGE_GENERATION = REQUEST_TIMEOUT_MS * 5;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4.1\": \"2024-06\",\n \"gpt-4.1-2025-04-14\": \"2024-06\",\n \"gpt-4.1-mini\": \"2024-06\",\n \"gpt-4.1-mini-2025-04-14\": \"2024-06\",\n \"gpt-4.1-nano\": \"2024-06\",\n \"gpt-4.1-nano-2025-04-14\": \"2024-06\",\n \"gpt-4.5-preview\": \"2023-10\",\n \"gpt-4.5-preview-2025-02-27\": \"2023-10\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n o1: \"2023-10\",\n \"o1-pro\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /gpt-4o-mini/,\n /gpt-4\\.1/,\n /gpt-4\\.1-mini/,\n /gpt-4\\.1-nano/,\n /gpt-4\\.5-preview/,\n /gpt-4\\.5-preview-2025-02-27/,\n /gpt-4\\.1/,\n /claude/,\n /gemini-(.*)/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /^gpt-image-1$/,\n /glm-4v/,\n /vl/i,\n /o4-mini/,\n /o1/,\n /o3/,\n /o4/,\n /gpt-5/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-2/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4.1\",\n \"gpt-4.1-2025-04-14\",\n \"gpt-4.1-mini\",\n \"gpt-4.1-mini-2025-04-14\",\n \"gpt-4.1-nano\",\n \"gpt-4.1-nano-2025-04-14\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"gpt-5-chat\",\n \"gpt-5-mini\",\n \"gpt-5-nano\",\n \"gpt-5\",\n \"gpt-5-chat-2025-01-01-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1\",\n \"o1-preview\",\n \"o1-pro\",\n \"o3-mini\",\n \"o3\",\n \"o4-mini\",\n \"gpt-image-1\",\n];\n\nconst googleModels = [\n // https://ai.google.dev/gemini-api/docs/models/gemini?\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite\",\n // https://ai.google.dev/gemini-api/docs/models/experimental-models?\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-2.0-flash-thinking-exp\",\n \"gemini-2.0-flash-thinking-exp-1219\",\n \"gemini-2.0-pro-exp\",\n \"gemini-2.5-pro-preview-06-05\",\n];\n\nconst anthropicModels = [\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n \"claude-opus-4-20250514\",\n \"claude-sonnet-4-20250514\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n \"deepseek-v3-241226\",\n \"deepseek-r1-250120\",\n \"deepseek-r1-distill-qwen-7b-250120\",\n \"deepseek-r1-distill-qwen-32b-250120\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";\n"}, "6164f3a31b67924c8d290c1dd1ba2e4dcb589db3": {"t": 1785758947.6600664, "n": 18063, "h": "9b73cf979336cb94", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\nexport const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5;\nexport const REQUEST_TIMEOUT_MS_FOR_IMAGE_GENERATION = REQUEST_TIMEOUT_MS * 5;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4.1\": \"2024-06\",\n \"gpt-4.1-2025-04-14\": \"2024-06\",\n \"gpt-4.1-mini\": \"2024-06\",\n \"gpt-4.1-mini-2025-04-14\": \"2024-06\",\n \"gpt-4.1-nano\": \"2024-06\",\n \"gpt-4.1-nano-2025-04-14\": \"2024-06\",\n \"gpt-4.5-preview\": \"2023-10\",\n \"gpt-4.5-preview-2025-02-27\": \"2023-10\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n o1: \"2023-10\",\n \"o1-pro\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /gpt-4o-mini/,\n /gpt-4\\.1/,\n /gpt-4\\.1-mini/,\n /gpt-4\\.1-nano/,\n /gpt-4\\.5-preview/,\n /gpt-4\\.5-preview-2025-02-27/,\n /gpt-4\\.1/,\n /claude/,\n /gemini-(.*)/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /^gpt-image-1$/,\n /glm-4v/,\n /vl/i,\n /o4-mini/,\n /o1/,\n /o3/,\n /o4/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-2/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4.1\",\n \"gpt-4.1-2025-04-14\",\n \"gpt-4.1-mini\",\n \"gpt-4.1-mini-2025-04-14\",\n \"gpt-4.1-nano\",\n \"gpt-4.1-nano-2025-04-14\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1\",\n \"o1-preview\",\n \"o1-pro\",\n \"o3-mini\",\n \"o3\",\n \"o4-mini\",\n \"gpt-image-1\",\n];\n\nconst googleModels = [\n // https://ai.google.dev/gemini-api/docs/models/gemini?\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite\",\n // https://ai.google.dev/gemini-api/docs/models/experimental-models?\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-2.0-flash-thinking-exp\",\n \"gemini-2.0-flash-thinking-exp-1219\",\n \"gemini-2.0-pro-exp\",\n \"gemini-2.5-pro-preview-06-05\",\n];\n\nconst anthropicModels = [\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n \"claude-opus-4-20250514\",\n \"claude-sonnet-4-20250514\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n \"deepseek-v3-241226\",\n \"deepseek-r1-250120\",\n \"deepseek-r1-distill-qwen-7b-250120\",\n \"deepseek-r1-distill-qwen-32b-250120\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";\n"}, "139395f135ffd76998824354d4bcc1e7d7956d18": {"t": 1785758949.2049751, "n": 17889, "h": "4cec304b47dfb6ba", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\nexport const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5;\nexport const REQUEST_TIMEOUT_MS_FOR_IMAGE_GENERATION = REQUEST_TIMEOUT_MS * 5;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4.1\": \"2024-06\",\n \"gpt-4.1-2025-04-14\": \"2024-06\",\n \"gpt-4.1-mini\": \"2024-06\",\n \"gpt-4.1-mini-2025-04-14\": \"2024-06\",\n \"gpt-4.1-nano\": \"2024-06\",\n \"gpt-4.1-nano-2025-04-14\": \"2024-06\",\n \"gpt-4.5-preview\": \"2023-10\",\n \"gpt-4.5-preview-2025-02-27\": \"2023-10\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n o1: \"2023-10\",\n \"o1-pro\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /gpt-4o-mini/,\n /gpt-4\\.1/,\n /gpt-4\\.1-mini/,\n /gpt-4\\.1-nano/,\n /gpt-4\\.5-preview/,\n /gpt-4\\.5-preview-2025-02-27/,\n /gpt-4\\.1/,\n /claude/,\n /gemini-(.*)/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /^gpt-image-1$/,\n /glm-4v/,\n /vl/i,\n /o4-mini/,\n /o1/,\n /o3/,\n /o4/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-2/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4.1\",\n \"gpt-4.1-2025-04-14\",\n \"gpt-4.1-mini\",\n \"gpt-4.1-mini-2025-04-14\",\n \"gpt-4.1-nano\",\n \"gpt-4.1-nano-2025-04-14\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1\",\n \"o1-preview\",\n \"o1-pro\",\n \"o3-mini\",\n \"o3\",\n \"o4-mini\",\n \"gpt-image-1\",\n];\n\nconst googleModels = [\n // https://ai.google.dev/gemini-api/docs/models/gemini?\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n // https://ai.google.dev/gemini-api/docs/models/experimental-models?\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n];\n\nconst anthropicModels = [\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n \"claude-opus-4-20250514\",\n \"claude-sonnet-4-20250514\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n \"deepseek-v3-241226\",\n \"deepseek-r1-250120\",\n \"deepseek-r1-distill-qwen-7b-250120\",\n \"deepseek-r1-distill-qwen-32b-250120\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";\n"}, "2ac6a60ff8a260785de1a81f2636b9ff590e5489": {"t": 1785758952.4647808, "n": 17851, "h": "16b692f79313d9d0", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\nexport const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5;\nexport const REQUEST_TIMEOUT_MS_FOR_IMAGE_GENERATION = REQUEST_TIMEOUT_MS * 5;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4.1\": \"2024-06\",\n \"gpt-4.1-2025-04-14\": \"2024-06\",\n \"gpt-4.1-mini\": \"2024-06\",\n \"gpt-4.1-mini-2025-04-14\": \"2024-06\",\n \"gpt-4.1-nano\": \"2024-06\",\n \"gpt-4.1-nano-2025-04-14\": \"2024-06\",\n \"gpt-4.5-preview\": \"2023-10\",\n \"gpt-4.5-preview-2025-02-27\": \"2023-10\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n \"o1\": \"2023-10\",\n \"o1-pro\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /gpt-4o-mini/,\n /gpt-4\\.1/,\n /gpt-4\\.1-mini/,\n /gpt-4\\.1-nano/,\n /gpt-4\\.5-preview/,\n /gpt-4\\.5-preview-2025-02-27/,\n /gpt-4\\.1/,\n /claude-3/,\n /gemini-(.*)/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /^gpt-image-1$/,\n /glm-4v/,\n /vl/i,\n /o4-mini/,\n /o1/,\n /o3/,\n /o4/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4.1\",\n \"gpt-4.1-2025-04-14\",\n \"gpt-4.1-mini\",\n \"gpt-4.1-mini-2025-04-14\",\n \"gpt-4.1-nano\",\n \"gpt-4.1-nano-2025-04-14\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1\",\n \"o1-preview\",\n \"o1-pro\",\n \"o3-mini\",\n \"o3\",\n \"o4-mini\",\n \"gpt-image-1\",\n];\n\nconst googleModels = [\n // https://ai.google.dev/gemini-api/docs/models/gemini?\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n // https://ai.google.dev/gemini-api/docs/models/experimental-models?\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n];\n\nconst anthropicModels = [\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n \"deepseek-v3-241226\",\n \"deepseek-r1-250120\",\n \"deepseek-r1-distill-qwen-7b-250120\",\n \"deepseek-r1-distill-qwen-32b-250120\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";"}, "c9adf8122cb9a4df704a1ba0fb61b07a0a221bdf": {"t": 1785758954.4314668, "n": 17746, "h": "b2999edbcd6ff5ed", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\nexport const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5;\nexport const REQUEST_TIMEOUT_MS_FOR_IMAGE_GENERATION = REQUEST_TIMEOUT_MS * 5;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4.1\": \"2024-06\",\n \"gpt-4.1-2025-04-14\": \"2024-06\",\n \"gpt-4.1-mini\": \"2024-06\",\n \"gpt-4.1-mini-2025-04-14\": \"2024-06\",\n \"gpt-4.1-nano\": \"2024-06\",\n \"gpt-4.1-nano-2025-04-14\": \"2024-06\",\n \"gpt-4.5-preview\": \"2023-10\",\n \"gpt-4.5-preview-2025-02-27\": \"2023-10\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n \"o1\": \"2023-10\",\n \"o1-pro\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /gpt-4\\.1/,\n /claude-3/,\n /gemini-1\\.5/,\n /gemini-exp/,\n /gemini-2\\.0/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /glm-4v/,\n /o4-mini/,\n /o1/,\n /o3/,\n /o4/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4.1\",\n \"gpt-4.1-2025-04-14\",\n \"gpt-4.1-mini\",\n \"gpt-4.1-mini-2025-04-14\",\n \"gpt-4.1-nano\",\n \"gpt-4.1-nano-2025-04-14\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1\",\n \"o1-preview\",\n \"o1-pro\",\n \"o3-mini\",\n \"o3\",\n \"o4-mini\",\n \"gpt-image-1\",\n];\n\nconst googleModels = [\n // https://ai.google.dev/gemini-api/docs/models/gemini?\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n // https://ai.google.dev/gemini-api/docs/models/experimental-models?\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n];\n\nconst anthropicModels = [\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n \"deepseek-v3-241226\",\n \"deepseek-r1-250120\",\n \"deepseek-r1-distill-qwen-7b-250120\",\n \"deepseek-r1-distill-qwen-32b-250120\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";"}, "42e0d5842b90aa9c2f292119e97cee6a5ab7970d": {"t": 1785758957.888586, "n": 17705, "h": "6c91ed4766d93bc0", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\nexport const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5;\nexport const REQUEST_TIMEOUT_MS_FOR_IMAGE_GENERATION = REQUEST_TIMEOUT_MS * 5;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4.1\": \"2024-06\",\n \"gpt-4.1-2025-04-14\": \"2024-06\",\n \"gpt-4.1-mini\": \"2024-06\",\n \"gpt-4.1-mini-2025-04-14\": \"2024-06\",\n \"gpt-4.1-nano\": \"2024-06\",\n \"gpt-4.1-nano-2025-04-14\": \"2024-06\",\n \"gpt-4.5-preview\": \"2023-10\",\n \"gpt-4.5-preview-2025-02-27\": \"2023-10\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n \"o1\": \"2023-10\",\n \"o1-pro\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /gpt-4\\.1/,\n /claude-3/,\n /gemini-1\\.5/,\n /gemini-exp/,\n /gemini-2\\.0/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /glm-4v/,\n /o3/,\n /o4-mini/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4.1\",\n \"gpt-4.1-2025-04-14\",\n \"gpt-4.1-mini\",\n \"gpt-4.1-mini-2025-04-14\",\n \"gpt-4.1-nano\",\n \"gpt-4.1-nano-2025-04-14\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n \"o1-pro\",\n \"o3-mini\",\n \"o3\",\n \"o4-mini\",\n];\n\nconst googleModels = [\n // https://ai.google.dev/gemini-api/docs/models/gemini?\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n // https://ai.google.dev/gemini-api/docs/models/experimental-models?\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n];\n\nconst anthropicModels = [\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n \"deepseek-v3-241226\",\n \"deepseek-r1-250120\",\n \"deepseek-r1-distill-qwen-7b-250120\",\n \"deepseek-r1-distill-qwen-32b-250120\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";"}, "f79bf6c7740a0fe9d9a89e692642f3cdcdec079d": {"t": 1785758959.2997968, "n": 17158, "h": "60663142a879cd90", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\nexport const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5;\nexport const REQUEST_TIMEOUT_MS_FOR_IMAGE_GENERATION = REQUEST_TIMEOUT_MS * 5;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n \"o1\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /claude-3/,\n /gemini-1\\.5/,\n /gemini-exp/,\n /gemini-2\\.0/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /glm-4v/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n \"o3-mini\",\n];\n\nconst googleModels = [\n // https://ai.google.dev/gemini-api/docs/models/gemini?\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n // https://ai.google.dev/gemini-api/docs/models/experimental-models?\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n];\n\nconst anthropicModels = [\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n \"deepseek-v3-241226\",\n \"deepseek-r1-250120\",\n \"deepseek-r1-distill-qwen-7b-250120\",\n \"deepseek-r1-distill-qwen-32b-250120\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";"}, "509cfebbbe8e3c4f0d838b948b55ead78fbeeae4": {"t": 1785758960.6472182, "n": 17160, "h": "2068d84c22205ae1", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\nexport const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n \"o1\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /claude-3/,\n /gemini-1\\.5/,\n /gemini-exp/,\n /gemini-2\\.0/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /glm-4v/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n \"o3-mini\",\n];\n\nconst googleModels = [\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n];\n\nconst anthropicModels = [\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n \"deepseek-v3-241226\",\n \"deepseek-r1-250120\",\n \"deepseek-r1-distill-qwen-7b-250120\",\n \"deepseek-r1-distill-qwen-32b-250120\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\n \"grok-beta\",\n \"grok-2\",\n \"grok-2-1212\",\n \"grok-2-latest\",\n \"grok-vision-beta\",\n \"grok-2-vision-1212\",\n \"grok-2-vision\",\n \"grok-2-vision-latest\",\n];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n \"Pro/deepseek-ai/DeepSeek-R1\",\n \"Pro/deepseek-ai/DeepSeek-V3\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";"}, "39daadece6b53bc3b6cb91b7381d8e62c5533069": {"t": 1785758962.5182054, "n": 17089, "h": "8186c6751cfead52", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n \"o1\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /claude-3/,\n /gemini-1\\.5/,\n /gemini-exp/,\n /gemini-2\\.0/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /glm-4v/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n \"o3-mini\",\n];\n\nconst googleModels = [\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n];\n\nconst anthropicModels = [\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n \"deepseek-v3-241226\",\n \"deepseek-r1-250120\",\n \"deepseek-r1-distill-qwen-7b-250120\",\n \"deepseek-r1-distill-qwen-32b-250120\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\n \"grok-beta\",\n \"grok-2\",\n \"grok-2-1212\",\n \"grok-2-latest\",\n \"grok-vision-beta\",\n \"grok-2-vision-1212\",\n \"grok-2-vision\",\n \"grok-2-vision-latest\",\n];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n \"Pro/deepseek-ai/DeepSeek-R1\",\n \"Pro/deepseek-ai/DeepSeek-V3\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";"}, "94d4e01ec74c304a3126fc9cba3b2a81a51f425d": {"t": 1785758963.8096116, "n": 16960, "h": "5b97df64e9f36059", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n \"o1\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /claude-3/,\n /gemini-1\\.5/,\n /gemini-exp/,\n /gemini-2\\.0/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /glm-4v/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"gpt-4.5-preview\",\n \"gpt-4.5-preview-2025-02-27\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n \"o3-mini\",\n];\n\nconst googleModels = [\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n];\n\nconst anthropicModels = [\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\n \"grok-beta\",\n \"grok-2\",\n \"grok-2-1212\",\n \"grok-2-latest\",\n \"grok-vision-beta\",\n \"grok-2-vision-1212\",\n \"grok-2-vision\",\n \"grok-2-vision-latest\",\n];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n \"Pro/deepseek-ai/DeepSeek-R1\",\n \"Pro/deepseek-ai/DeepSeek-V3\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";"}, "3b60f1053c6ce9f09cb001b67eb8879865a23c3f": {"t": 1785758965.291535, "n": 16907, "h": "4ff43c97db1ed90f", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n \"o1\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /claude-3/,\n /gemini-1\\.5/,\n /gemini-exp/,\n /gemini-2\\.0/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /glm-4v/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n \"o3-mini\",\n];\n\nconst googleModels = [\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-pro\",\n \"gemini-2.0-pro-exp-02-05\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-flash-exp\",\n \"gemini-exp-1206\",\n \"learnlm-1.5-pro-experimental\",\n];\n\nconst anthropicModels = [\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\n \"grok-beta\",\n \"grok-2\",\n \"grok-2-1212\",\n \"grok-2-latest\",\n \"grok-vision-beta\",\n \"grok-2-vision-1212\",\n \"grok-2-vision\",\n \"grok-2-vision-latest\",\n];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n \"Pro/deepseek-ai/DeepSeek-R1\",\n \"Pro/deepseek-ai/DeepSeek-V3\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";"}, "2b2368696f1683f80e0fa23921281ae332eec813": {"t": 1785758967.000339, "n": 17293, "h": "57f56699e02f5234", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n \"o1\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /claude-3/,\n /gemini-1\\.5/,\n /gemini-exp/,\n /gemini-2\\.0/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /glm-4v/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n \"o3-mini\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\", // Deprecated on 2/15/2025\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-pro\",\n \"gemini-1.5-pro-002\",\n \"gemini-1.5-pro-exp-0827\",\n \"gemini-1.5-flash-latest\",\n \"gemini-1.5-flash-8b-latest\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-flash-002\",\n \"gemini-1.5-flash-exp-0827\",\n \"learnlm-1.5-pro-experimental\",\n \"gemini-exp-1114\",\n \"gemini-exp-1121\",\n \"gemini-exp-1206\",\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-exp\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-2.0-flash-thinking-exp\",\n \"gemini-2.0-flash-thinking-exp-1219\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-pro-exp\",\n \"gemini-2.0-pro-exp-02-05\",\n];\n\nconst anthropicModels = [\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-7-sonnet-20250219\",\n \"claude-3-7-sonnet-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\n \"grok-beta\",\n \"grok-2\",\n \"grok-2-1212\",\n \"grok-2-latest\",\n \"grok-vision-beta\",\n \"grok-2-vision-1212\",\n \"grok-2-vision\",\n \"grok-2-vision-latest\",\n];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n \"Pro/deepseek-ai/DeepSeek-R1\",\n \"Pro/deepseek-ai/DeepSeek-V3\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";"}, "3ed7e42a1a3677f428d93fb2b9b20eb176d96c79": {"t": 1785758968.4743764, "n": 18980, "h": "bb424331a0a1b43c", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n \"o1\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /claude-3/,\n /gemini-1\\.5/,\n /gemini-exp/,\n /gemini-2\\.0/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /glm-4v/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n \"o3-mini\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\", // Deprecated on 2/15/2025\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-pro\",\n \"gemini-1.5-pro-002\",\n \"gemini-1.5-pro-exp-0827\",\n \"gemini-1.5-flash-latest\",\n \"gemini-1.5-flash-8b-latest\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-flash-002\",\n \"gemini-1.5-flash-exp-0827\",\n \"learnlm-1.5-pro-experimental\",\n \"gemini-exp-1114\",\n \"gemini-exp-1121\",\n \"gemini-exp-1206\",\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-exp\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-2.0-flash-thinking-exp\",\n \"gemini-2.0-flash-thinking-exp-1219\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-pro-exp\",\n \"gemini-2.0-pro-exp-02-05\",\n];\n\nconst anthropicModels = [\n \"claude-instant-1.2\",\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\n \"grok-beta\",\n \"grok-2\",\n \"grok-2-1212\",\n \"grok-2-latest\",\n \"grok-vision-beta\",\n \"grok-2-vision-1212\",\n \"grok-2-vision\",\n \"grok-2-vision-latest\",\n];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n \"Pro/deepseek-ai/DeepSeek-R1\",\n \"Pro/deepseek-ai/DeepSeek-V3\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";\n\nexport const MYFILES_BROWSER_TOOLS_SYSTEM_PROMPT = `\n# Tools\n\n## myfiles_browser\n\nYou have the tool 'myfiles_browser' with the following functions:\nissues queries to search the file(s) uploaded in the current conversation and displays the results.\n\nThis tool is for browsing the files uploaded by the user.\n\nParts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.\n\nIf the user needs to summarize the document, they can summarize it through parts of the document.\n\nThink carefully about how the information you find relates to the user's request. Respond as soon as you find information that clearly answers the request.\n\nIssue multiple queries to the 'myfiles_browser' command only when the user's question needs to be decomposed to find different facts. In other scenarios, prefer providing a single query. Avoid single-word queries that are extremely broad and will return unrelated results.\n\nHere are some examples of how to use the 'myfiles_browser' command:\nUser: What was the GDP of France and Italy in the 1970s? => myfiles_browser([\"france gdp 1970\", \"italy gdp 1970\"])\nUser: What does the report say about the GPT4 performance on MMLU? => myfiles_browser([\"GPT4 MMLU performance\"])\nUser: How can I integrate customer relationship management system with third-party email marketing tools? => myfiles_browser([\"customer management system marketing integration\"])\nUser: What are the best practices for data security and privacy for our cloud storage services? => myfiles_browser([\"cloud storage security and privacy\"])\n\nThe user has uploaded the following files:\n`;\n"}, "cec6dea710e6483093ca01a5e30b9c4570ec1838": {"t": 1785758970.4854243, "n": 18770, "h": "cea0c00e9844bd4c", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n \"o1\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /claude-3/,\n /gemini-1\\.5/,\n /gemini-exp/,\n /gemini-2\\.0/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /glm-4v/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n \"o3-mini\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\", // Deprecated on 2/15/2025\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-pro\",\n \"gemini-1.5-pro-002\",\n \"gemini-1.5-pro-exp-0827\",\n \"gemini-1.5-flash-latest\",\n \"gemini-1.5-flash-8b-latest\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-flash-002\",\n \"gemini-1.5-flash-exp-0827\",\n \"learnlm-1.5-pro-experimental\",\n \"gemini-exp-1114\",\n \"gemini-exp-1121\",\n \"gemini-exp-1206\",\n \"gemini-2.0-flash\",\n \"gemini-2.0-flash-exp\",\n \"gemini-2.0-flash-lite-preview-02-05\",\n \"gemini-2.0-flash-thinking-exp\",\n \"gemini-2.0-flash-thinking-exp-1219\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n \"gemini-2.0-pro-exp\",\n \"gemini-2.0-pro-exp-02-05\",\n];\n\nconst anthropicModels = [\n \"claude-instant-1.2\",\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";\n\nexport const MYFILES_BROWSER_TOOLS_SYSTEM_PROMPT = `\n# Tools\n\n## myfiles_browser\n\nYou have the tool 'myfiles_browser' with the following functions:\nissues queries to search the file(s) uploaded in the current conversation and displays the results.\n\nThis tool is for browsing the files uploaded by the user.\n\nParts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.\n\nIf the user needs to summarize the document, they can summarize it through parts of the document.\n\nThink carefully about how the information you find relates to the user's request. Respond as soon as you find information that clearly answers the request.\n\nIssue multiple queries to the 'myfiles_browser' command only when the user's question needs to be decomposed to find different facts. In other scenarios, prefer providing a single query. Avoid single-word queries that are extremely broad and will return unrelated results.\n\nHere are some examples of how to use the 'myfiles_browser' command:\nUser: What was the GDP of France and Italy in the 1970s? => myfiles_browser([\"france gdp 1970\", \"italy gdp 1970\"])\nUser: What does the report say about the GPT4 performance on MMLU? => myfiles_browser([\"GPT4 MMLU performance\"])\nUser: How can I integrate customer relationship management system with third-party email marketing tools? => myfiles_browser([\"customer management system marketing integration\"])\nUser: What are the best practices for data security and privacy for our cloud storage services? => myfiles_browser([\"cloud storage security and privacy\"])\n\nThe user has uploaded the following files:\n`;\n"}, "d3da212822f4deaa34a5420c3df0f288d0b84d7d": {"t": 1785758972.1994853, "n": 18653, "h": "d3edee52e3c9593c", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/ChatGPTNextWeb/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const SILICONFLOW_BASE_URL = \"https://api.siliconflow.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n DeepSeek = \"/api/deepseek\",\n SiliconFlow = \"/api/siliconflow\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n DeepSeek = \"DeepSeek\",\n SiliconFlow = \"SiliconFlow\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DeepSeek = {\n ExampleEndpoint: DEEPSEEK_BASE_URL,\n ChatPath: \"chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const SiliconFlow = {\n ExampleEndpoint: SILICONFLOW_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\nexport const DEEPSEEK_SUMMARIZE_MODEL = \"deepseek-chat\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini-2024-09-12\": \"2023-10\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview-2024-09-12\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n \"o1-2024-12-17\": \"2023-10\",\n \"o1\": \"2023-10\",\n \"o3-mini-2025-01-31\": \"2023-10\",\n \"o3-mini\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n \"deepseek-chat\": \"2024-07\",\n \"deepseek-coder\": \"2024-07\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const VISION_MODEL_REGEXES = [\n /vision/,\n /gpt-4o/,\n /claude-3/,\n /gemini-1\\.5/,\n /gemini-exp/,\n /gemini-2\\.0/,\n /learnlm/,\n /qwen-vl/,\n /qwen2-vl/,\n /gpt-4-turbo(?!.*preview)/, // Matches \"gpt-4-turbo\" but not \"gpt-4-turbo-preview\"\n /^dall-e-3$/, // Matches exactly \"dall-e-3\"\n /glm-4v/,\n];\n\nexport const EXCLUDE_VISION_MODEL_REGEXES = [/claude-3-5-haiku-20241022/];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n // As of July 2024, gpt-4o-mini should be used in place of gpt-3.5-turbo,\n // as it is cheaper, more capable, multimodal, and just as fast. gpt-3.5-turbo is still available for use in the API.\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n \"o3-mini\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\", // Deprecated on 2/15/2025\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-pro\",\n \"gemini-1.5-pro-002\",\n \"gemini-1.5-pro-exp-0827\",\n \"gemini-1.5-flash-latest\",\n \"gemini-1.5-flash-8b-latest\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-flash-002\",\n \"gemini-1.5-flash-exp-0827\",\n \"learnlm-1.5-pro-experimental\",\n \"gemini-exp-1114\",\n \"gemini-exp-1121\",\n \"gemini-exp-1206\",\n \"gemini-2.0-flash-exp\",\n \"gemini-2.0-flash-thinking-exp\",\n \"gemini-2.0-flash-thinking-exp-1219\",\n \"gemini-2.0-flash-thinking-exp-01-21\",\n];\n\nconst anthropicModels = [\n \"claude-instant-1.2\",\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-haiku-20241022\",\n \"claude-3-5-haiku-latest\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst deepseekModels = [\"deepseek-chat\", \"deepseek-coder\", \"deepseek-reasoner\"];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n \"glm-4v-plus\",\n \"glm-4v\",\n \"glm-4v-flash\", // free\n \"cogview-3-plus\",\n \"cogview-3\",\n \"cogview-3-flash\", // free\n // Polling tasks cannot be adapted to\n // \"cogvideox\",\n // \"cogvideox-flash\", // free\n];\n\nconst siliconflowModels = [\n \"Qwen/Qwen2.5-7B-Instruct\",\n \"Qwen/Qwen2.5-72B-Instruct\",\n \"deepseek-ai/DeepSeek-R1\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-70B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Llama-8B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-14B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B\",\n \"deepseek-ai/DeepSeek-R1-Distill-Qwen-7B\",\n \"deepseek-ai/DeepSeek-V3\",\n \"meta-llama/Llama-3.3-70B-Instruct\",\n \"THUDM/glm-4-9b-chat\",\n];\n\nlet seq = 1000; // Built-in model number generator starts at 1000\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // Here is fixed, ensuring the order is consistent with the previous built-in version\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n ...deepseekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"deepseek\",\n providerName: \"DeepSeek\",\n providerType: \"deepseek\",\n sorted: 13,\n },\n })),\n ...siliconflowModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"siliconflow\",\n providerName: \"SiliconFlow\",\n providerType: \"siliconflow\",\n sorted: 14,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";\n\nexport const MYFILES_BROWSER_TOOLS_SYSTEM_PROMPT = `\n# Tools\n\n## myfiles_browser\n\nYou have the tool 'myfiles_browser' with the following functions:\nissues queries to search the file(s) uploaded in the current conversation and displays the results.\n\nThis tool is for browsing the files uploaded by the user.\n\nParts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.\n\nIf the user needs to summarize the document, they can summarize it through parts of the document.\n\nThink carefully about how the information you find relates to the user's request. Respond as soon as you find information that clearly answers the request.\n\nIssue multiple queries to the 'myfiles_browser' command only when the user's question needs to be decomposed to find different facts. In other scenarios, prefer providing a single query. Avoid single-word queries that are extremely broad and will return unrelated results.\n\nHere are some examples of how to use the 'myfiles_browser' command:\nUser: What was the GDP of France and Italy in the 1970s? => myfiles_browser([\"france gdp 1970\", \"italy gdp 1970\"])\nUser: What does the report say about the GPT4 performance on MMLU? => myfiles_browser([\"GPT4 MMLU performance\"])\nUser: How can I integrate customer relationship management system with third-party email marketing tools? => myfiles_browser([\"customer management system marketing integration\"])\nUser: What are the best practices for data security and privacy for our cloud storage services? => myfiles_browser([\"cloud storage security and privacy\"])\n\nThe user has uploaded the following files:\n`;\n"}, "bb4de78b4881eec9b2acd804d9ff46da6c30f184": {"t": 1785758973.4320097, "n": 15796, "h": "f7834eb02972690d", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/${OWNER}/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\", // Deprecated on 2/15/2025\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-pro\",\n \"gemini-1.5-pro-002\",\n \"gemini-1.5-pro-exp-0827\",\n \"gemini-1.5-flash-latest\",\n \"gemini-1.5-flash-8b-latest\",\n \"gemini-1.5-flash\",\n \"gemini-1.5-flash-8b\",\n \"gemini-1.5-flash-002\",\n \"gemini-1.5-flash-exp-0827\",\n \"learnlm-1.5-pro-experimental\",\n \"gemini-exp-1114\",\n \"gemini-exp-1121\",\n \"gemini-exp-1206\",\n \"gemini-2.0-flash-exp\",\n \"gemini-2.0-flash-thinking-exp-1219\",\n];\n\nconst anthropicModels = [\n \"claude-instant-1.2\",\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-5-haiku-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n];\n\nlet seq = 1000; // 内置的模型序号生成器从1000开始\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // 这里是固定的,确保顺序与之前内置的版本一致\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";\n\nexport const MYFILES_BROWSER_TOOLS_SYSTEM_PROMPT = `\n# Tools\n\n## myfiles_browser\n\nYou have the tool 'myfiles_browser' with the following functions:\nissues queries to search the file(s) uploaded in the current conversation and displays the results.\n\nThis tool is for browsing the files uploaded by the user.\n\nParts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.\n\nIf the user needs to summarize the document, they can summarize it through parts of the document.\n\nThink carefully about how the information you find relates to the user's request. Respond as soon as you find information that clearly answers the request.\n\nIssue multiple queries to the 'myfiles_browser' command only when the user's question needs to be decomposed to find different facts. In other scenarios, prefer providing a single query. Avoid single-word queries that are extremely broad and will return unrelated results.\n\nHere are some examples of how to use the 'myfiles_browser' command:\nUser: What was the GDP of France and Italy in the 1970s? => myfiles_browser([\"france gdp 1970\", \"italy gdp 1970\"])\nUser: What does the report say about the GPT4 performance on MMLU? => myfiles_browser([\"GPT4 MMLU performance\"])\nUser: How can I integrate customer relationship management system with third-party email marketing tools? => myfiles_browser([\"customer management system marketing integration\"])\nUser: What are the best practices for data security and privacy for our cloud storage services? => myfiles_browser([\"cloud storage security and privacy\"])\n\nThe user has uploaded the following files:\n`;\n"}, "aae578bece547a3431ea5b6132a4574cf52aac52": {"t": 1785758974.7872932, "n": 15496, "h": "63ed7fba604ac5c5", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/${OWNER}/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-2024-11-20\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-2024-11-20\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\",\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-flash-latest\",\n \"gemini-pro-vision\",\n \"gemini-exp-1114\",\n \"gemini-exp-1121\",\n \"learnlm-1.5-pro-experimental\",\n];\n\nconst anthropicModels = [\n \"claude-instant-1.2\",\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-5-haiku-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n];\n\nlet seq = 1000; // 内置的模型序号生成器从1000开始\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // 这里是固定的,确保顺序与之前内置的版本一致\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";\n\nexport const MYFILES_BROWSER_TOOLS_SYSTEM_PROMPT = `\n# Tools\n\n## myfiles_browser\n\nYou have the tool 'myfiles_browser' with the following functions:\nissues queries to search the file(s) uploaded in the current conversation and displays the results.\n\nThis tool is for browsing the files uploaded by the user.\n\nParts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.\n\nIf the user needs to summarize the document, they can summarize it through parts of the document.\n\nThink carefully about how the information you find relates to the user's request. Respond as soon as you find information that clearly answers the request.\n\nIssue multiple queries to the 'myfiles_browser' command only when the user's question needs to be decomposed to find different facts. In other scenarios, prefer providing a single query. Avoid single-word queries that are extremely broad and will return unrelated results.\n\nHere are some examples of how to use the 'myfiles_browser' command:\nUser: What was the GDP of France and Italy in the 1970s? => myfiles_browser([\"france gdp 1970\", \"italy gdp 1970\"])\nUser: What does the report say about the GPT4 performance on MMLU? => myfiles_browser([\"GPT4 MMLU performance\"])\nUser: How can I integrate customer relationship management system with third-party email marketing tools? => myfiles_browser([\"customer management system marketing integration\"])\nUser: What are the best practices for data security and privacy for our cloud storage services? => myfiles_browser([\"cloud storage security and privacy\"])\n\nThe user has uploaded the following files:\n`;\n"}, "7208f7a92a5ba565b2c5e97af7d9ae8a2df33709": {"t": 1785758976.2116175, "n": 15363, "h": "3096f4bce904c2d7", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const PLUGINS_REPO_URL = `https://github.com/${OWNER}/NextChat-Awesome-Plugins`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const STABILITY_BASE_URL = \"https://api.stability.ai\";\n\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const TENCENT_BASE_URL = \"https://hunyuan.tencentcloudapi.com\";\n\nexport const MOONSHOT_BASE_URL = \"https://api.moonshot.cn\";\nexport const IFLYTEK_BASE_URL = \"https://spark-api-open.xf-yun.com\";\n\nexport const XAI_BASE_URL = \"https://api.x.ai\";\n\nexport const CHATGLM_BASE_URL = \"https://open.bigmodel.cn\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Tencent = \"/api/tencent\",\n Moonshot = \"/api/moonshot\",\n Iflytek = \"/api/iflytek\",\n Stability = \"/api/stability\",\n Artifacts = \"/api/artifacts\",\n XAI = \"/api/xai\",\n ChatGLM = \"/api/chatglm\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n Tencent = \"Tencent\",\n Moonshot = \"Moonshot\",\n Stability = \"Stability\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n Stability = \"Stability\",\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n Hunyuan = \"Hunyuan\",\n Moonshot = \"Moonshot\",\n Iflytek = \"Iflytek\",\n XAI = \"XAI\",\n ChatGLM = \"ChatGLM\",\n}\n\nexport const Stability = {\n GeneratePath: \"v2beta/stable-image/generate\",\n ExampleEndpoint: \"https://api.stability.ai\",\n};\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const Tencent = {\n ExampleEndpoint: TENCENT_BASE_URL,\n};\n\nexport const Moonshot = {\n ExampleEndpoint: MOONSHOT_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const Iflytek = {\n ExampleEndpoint: IFLYTEK_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const XAI = {\n ExampleEndpoint: XAI_BASE_URL,\n ChatPath: \"v1/chat/completions\",\n};\n\nexport const ChatGLM = {\n ExampleEndpoint: CHATGLM_BASE_URL,\n ChatPath: \"/api/paas/v4/chat/completions\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\",\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-flash-latest\",\n \"gemini-pro-vision\",\n];\n\nconst anthropicModels = [\n \"claude-instant-1.2\",\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-opus-latest\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-sonnet-20240620\",\n \"claude-3-5-sonnet-20241022\",\n \"claude-3-5-sonnet-latest\",\n \"claude-3-5-haiku-latest\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nconst tencentModels = [\n \"hunyuan-pro\",\n \"hunyuan-standard\",\n \"hunyuan-lite\",\n \"hunyuan-role\",\n \"hunyuan-functioncall\",\n \"hunyuan-code\",\n \"hunyuan-vision\",\n];\n\nconst moonshotModes = [\"moonshot-v1-8k\", \"moonshot-v1-32k\", \"moonshot-v1-128k\"];\n\nconst iflytekModels = [\n \"general\",\n \"generalv3\",\n \"pro-128k\",\n \"generalv3.5\",\n \"4.0Ultra\",\n];\n\nconst xAIModes = [\"grok-beta\"];\n\nconst chatglmModels = [\n \"glm-4-plus\",\n \"glm-4-0520\",\n \"glm-4\",\n \"glm-4-air\",\n \"glm-4-airx\",\n \"glm-4-long\",\n \"glm-4-flashx\",\n \"glm-4-flash\",\n];\n\nlet seq = 1000; // 内置的模型序号生成器从1000开始\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++, // Global sequence sort(index)\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n sorted: 1, // 这里是固定的,确保顺序与之前内置的版本一致\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n sorted: 2,\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n sorted: 3,\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n sorted: 4,\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n sorted: 5,\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n sorted: 6,\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n sorted: 7,\n },\n })),\n ...tencentModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"tencent\",\n providerName: \"Tencent\",\n providerType: \"tencent\",\n sorted: 8,\n },\n })),\n ...moonshotModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"moonshot\",\n providerName: \"Moonshot\",\n providerType: \"moonshot\",\n sorted: 9,\n },\n })),\n ...iflytekModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"iflytek\",\n providerName: \"Iflytek\",\n providerType: \"iflytek\",\n sorted: 10,\n },\n })),\n ...xAIModes.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"xai\",\n providerName: \"XAI\",\n providerType: \"xai\",\n sorted: 11,\n },\n })),\n ...chatglmModels.map((name) => ({\n name,\n available: true,\n sorted: seq++,\n provider: {\n id: \"chatglm\",\n providerName: \"ChatGLM\",\n providerType: \"chatglm\",\n sorted: 12,\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";\n\nexport const MYFILES_BROWSER_TOOLS_SYSTEM_PROMPT = `\n# Tools\n\n## myfiles_browser\n\nYou have the tool 'myfiles_browser' with the following functions:\nissues queries to search the file(s) uploaded in the current conversation and displays the results.\n\nThis tool is for browsing the files uploaded by the user.\n\nParts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.\n\nIf the user needs to summarize the document, they can summarize it through parts of the document.\n\nThink carefully about how the information you find relates to the user's request. Respond as soon as you find information that clearly answers the request.\n\nIssue multiple queries to the 'myfiles_browser' command only when the user's question needs to be decomposed to find different facts. In other scenarios, prefer providing a single query. Avoid single-word queries that are extremely broad and will return unrelated results.\n\nHere are some examples of how to use the 'myfiles_browser' command:\nUser: What was the GDP of France and Italy in the 1970s? => myfiles_browser([\"france gdp 1970\", \"italy gdp 1970\"])\nUser: What does the report say about the GPT4 performance on MMLU? => myfiles_browser([\"GPT4 MMLU performance\"])\nUser: How can I integrate customer relationship management system with third-party email marketing tools? => myfiles_browser([\"customer management system marketing integration\"])\nUser: What are the best practices for data security and privacy for our cloud storage services? => myfiles_browser([\"cloud storage security and privacy\"])\n\nThe user has uploaded the following files:\n`;\n"}, "172ae4cef05acc36446d8a747aabda20284463a5": {"t": 1785758979.460003, "n": 11882, "h": "401a7b1a3e0459ab", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const DEFAULT_API_HOST = \"https://api.nextchat.dev\";\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n GoogleAI = \"/api/google\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Artifacts = \"/api/artifacts\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n}\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\",\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-flash-latest\",\n \"gemini-pro-vision\",\n];\n\nconst anthropicModels = [\n \"claude-instant-1.2\",\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-sonnet-20240620\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const DEFAULT_GA_ID = \"G-89WN60ZK2E\";\n\nexport const MYFILES_BROWSER_TOOLS_SYSTEM_PROMPT = `\n# Tools\n\n## myfiles_browser\n\nYou have the tool 'myfiles_browser' with the following functions:\nissues queries to search the file(s) uploaded in the current conversation and displays the results.\n\nThis tool is for browsing the files uploaded by the user.\n\nParts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.\n\nIf the user needs to summarize the document, they can summarize it through parts of the document.\n\nThink carefully about how the information you find relates to the user's request. Respond as soon as you find information that clearly answers the request.\n\nIssue multiple queries to the 'myfiles_browser' command only when the user's question needs to be decomposed to find different facts. In other scenarios, prefer providing a single query. Avoid single-word queries that are extremely broad and will return unrelated results.\n\nHere are some examples of how to use the 'myfiles_browser' command:\nUser: What was the GDP of France and Italy in the 1970s? => myfiles_browser([\"france gdp 1970\", \"italy gdp 1970\"])\nUser: What does the report say about the GPT4 performance on MMLU? => myfiles_browser([\"GPT4 MMLU performance\"])\nUser: How can I integrate customer relationship management system with third-party email marketing tools? => myfiles_browser([\"customer management system marketing integration\"])\nUser: What are the best practices for data security and privacy for our cloud storage services? => myfiles_browser([\"cloud storage security and privacy\"])\n\nThe user has uploaded the following files:\n`;\n"}, "18e654de2b93d0314b38271e912924364f4c8c9d": {"t": 1785758980.7494106, "n": 11836, "h": "59235171ee087888", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const DEFAULT_API_HOST = \"https://api.nextchat.dev\";\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n Artifacts = \"/artifacts\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n GoogleAI = \"/api/google\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n Artifacts = \"/api/artifacts\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n}\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\",\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-flash-latest\",\n \"gemini-pro-vision\",\n];\n\nconst anthropicModels = [\n \"claude-instant-1.2\",\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-sonnet-20240620\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const MYFILES_BROWSER_TOOLS_SYSTEM_PROMPT = `\n# Tools\n\n## myfiles_browser\n\nYou have the tool 'myfiles_browser' with the following functions:\nissues queries to search the file(s) uploaded in the current conversation and displays the results.\n\nThis tool is for browsing the files uploaded by the user.\n\nParts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.\n\nIf the user needs to summarize the document, they can summarize it through parts of the document.\n\nThink carefully about how the information you find relates to the user's request. Respond as soon as you find information that clearly answers the request.\n\nIssue multiple queries to the 'myfiles_browser' command only when the user's question needs to be decomposed to find different facts. In other scenarios, prefer providing a single query. Avoid single-word queries that are extremely broad and will return unrelated results.\n\nHere are some examples of how to use the 'myfiles_browser' command:\nUser: What was the GDP of France and Italy in the 1970s? => myfiles_browser([\"france gdp 1970\", \"italy gdp 1970\"])\nUser: What does the report say about the GPT4 performance on MMLU? => myfiles_browser([\"GPT4 MMLU performance\"])\nUser: How can I integrate customer relationship management system with third-party email marketing tools? => myfiles_browser([\"customer management system marketing integration\"])\nUser: What are the best practices for data security and privacy for our cloud storage services? => myfiles_browser([\"cloud storage security and privacy\"])\n\nThe user has uploaded the following files:\n`;\n"}, "1c070058cb4b878bee3e5b54c5d3e85ddbff4eb4": {"t": 1785758983.1919112, "n": 11776, "h": "a8bda1868386486f", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const DEFAULT_API_HOST = \"https://api.nextchat.dev\";\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n GoogleAI = \"/api/google\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n}\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n ImagePath: \"v1/images/generations\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ImagePath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/images/generations?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\",\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-flash-latest\",\n \"gemini-pro-vision\",\n];\n\nconst anthropicModels = [\n \"claude-instant-1.2\",\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-sonnet-20240620\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const MYFILES_BROWSER_TOOLS_SYSTEM_PROMPT = `\n# Tools\n\n## myfiles_browser\n\nYou have the tool 'myfiles_browser' with the following functions:\nissues queries to search the file(s) uploaded in the current conversation and displays the results.\n\nThis tool is for browsing the files uploaded by the user.\n\nParts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.\n\nIf the user needs to summarize the document, they can summarize it through parts of the document.\n\nThink carefully about how the information you find relates to the user's request. Respond as soon as you find information that clearly answers the request.\n\nIssue multiple queries to the 'myfiles_browser' command only when the user's question needs to be decomposed to find different facts. In other scenarios, prefer providing a single query. Avoid single-word queries that are extremely broad and will return unrelated results.\n\nHere are some examples of how to use the 'myfiles_browser' command:\nUser: What was the GDP of France and Italy in the 1970s? => myfiles_browser([\"france gdp 1970\", \"italy gdp 1970\"])\nUser: What does the report say about the GPT4 performance on MMLU? => myfiles_browser([\"GPT4 MMLU performance\"])\nUser: How can I integrate customer relationship management system with third-party email marketing tools? => myfiles_browser([\"customer management system marketing integration\"])\nUser: What are the best practices for data security and privacy for our cloud storage services? => myfiles_browser([\"cloud storage security and privacy\"])\n\nThe user has uploaded the following files:\n`;\n"}, "1f5bf38d16f4c8cc2e06e02f623f8a79e269989e": {"t": 1785758984.5482209, "n": 11603, "h": "040561ea984bec4f", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const DEFAULT_API_HOST = \"https://api.nextchat.dev\";\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n GoogleAI = \"/api/google\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n}\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"chatgpt-4o-latest\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n \"o1-mini\": \"2023-10\",\n \"o1-preview\": \"2023-10\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"chatgpt-4o-latest\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n \"dall-e-3\",\n \"o1-mini\",\n \"o1-preview\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\",\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-flash-latest\",\n \"gemini-pro-vision\",\n];\n\nconst anthropicModels = [\n \"claude-instant-1.2\",\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-sonnet-20240620\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const MYFILES_BROWSER_TOOLS_SYSTEM_PROMPT = `\n# Tools\n\n## myfiles_browser\n\nYou have the tool 'myfiles_browser' with the following functions:\nissues queries to search the file(s) uploaded in the current conversation and displays the results.\n\nThis tool is for browsing the files uploaded by the user.\n\nParts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.\n\nIf the user needs to summarize the document, they can summarize it through parts of the document.\n\nThink carefully about how the information you find relates to the user's request. Respond as soon as you find information that clearly answers the request.\n\nIssue multiple queries to the 'myfiles_browser' command only when the user's question needs to be decomposed to find different facts. In other scenarios, prefer providing a single query. Avoid single-word queries that are extremely broad and will return unrelated results.\n\nHere are some examples of how to use the 'myfiles_browser' command:\nUser: What was the GDP of France and Italy in the 1970s? => myfiles_browser([\"france gdp 1970\", \"italy gdp 1970\"])\nUser: What does the report say about the GPT4 performance on MMLU? => myfiles_browser([\"GPT4 MMLU performance\"])\nUser: How can I integrate customer relationship management system with third-party email marketing tools? => myfiles_browser([\"customer management system marketing integration\"])\nUser: What are the best practices for data security and privacy for our cloud storage services? => myfiles_browser([\"cloud storage security and privacy\"])\n\nThe user has uploaded the following files:\n`;\n"}, "d50814f9e22767b354bee8795e032deea8f5e8e1": {"t": 1785758985.9666479, "n": 11452, "h": "7d32aff0bee82576", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const DEFAULT_API_HOST = \"https://api.nextchat.dev\";\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n GoogleAI = \"/api/google\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n}\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-2024-08-06\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-2024-08-06\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\",\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-flash-latest\",\n \"gemini-pro-vision\",\n];\n\nconst anthropicModels = [\n \"claude-instant-1.2\",\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-sonnet-20240620\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const MYFILES_BROWSER_TOOLS_SYSTEM_PROMPT = `\n# Tools\n\n## myfiles_browser\n\nYou have the tool 'myfiles_browser' with the following functions:\nissues queries to search the file(s) uploaded in the current conversation and displays the results.\n\nThis tool is for browsing the files uploaded by the user.\n\nParts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.\n\nIf the user needs to summarize the document, they can summarize it through parts of the document.\n\nThink carefully about how the information you find relates to the user's request. Respond as soon as you find information that clearly answers the request.\n\nIssue multiple queries to the 'myfiles_browser' command only when the user's question needs to be decomposed to find different facts. In other scenarios, prefer providing a single query. Avoid single-word queries that are extremely broad and will return unrelated results.\n\nHere are some examples of how to use the 'myfiles_browser' command:\nUser: What was the GDP of France and Italy in the 1970s? => myfiles_browser([\"france gdp 1970\", \"italy gdp 1970\"])\nUser: What does the report say about the GPT4 performance on MMLU? => myfiles_browser([\"GPT4 MMLU performance\"])\nUser: How can I integrate customer relationship management system with third-party email marketing tools? => myfiles_browser([\"customer management system marketing integration\"])\nUser: What are the best practices for data security and privacy for our cloud storage services? => myfiles_browser([\"cloud storage security and privacy\"])\n\nThe user has uploaded the following files:\n`;\n"}, "77a7606a9da3bd66f3ce2cbbd48a0a42b887e683": {"t": 1785758988.5584972, "n": 11395, "h": "cd5f08989825aa67", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const DEFAULT_API_HOST = \"https://api.nextchat.dev\";\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport const BAIDU_BASE_URL = \"https://aip.baidubce.com\";\nexport const BAIDU_OATUH_URL = `${BAIDU_BASE_URL}/oauth/2.0/token`;\n\nexport const BYTEDANCE_BASE_URL = \"https://ark.cn-beijing.volces.com\";\n\nexport const ALIBABA_BASE_URL = \"https://dashscope.aliyuncs.com/api/\";\n\nexport const CACHE_URL_PREFIX = \"/api/cache\";\nexport const UPLOAD_URL = `${CACHE_URL_PREFIX}/upload`;\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n Azure = \"/api/azure\",\n OpenAI = \"/api/openai\",\n GoogleAI = \"/api/google\",\n Anthropic = \"/api/anthropic\",\n Google = \"/api/google\",\n Baidu = \"/api/baidu\",\n ByteDance = \"/api/bytedance\",\n Alibaba = \"/api/alibaba\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n Baidu = \"Baidu\",\n ByteDance = \"ByteDance\",\n Alibaba = \"Alibaba\",\n}\n\n// Google API safety settings, see https://ai.google.dev/gemini-api/docs/safety-settings\n// BLOCK_NONE will not block any content, and BLOCK_ONLY_HIGH will block only high-risk content.\nexport enum GoogleSafetySettingsThreshold {\n BLOCK_NONE = \"BLOCK_NONE\",\n BLOCK_ONLY_HIGH = \"BLOCK_ONLY_HIGH\",\n BLOCK_MEDIUM_AND_ABOVE = \"BLOCK_MEDIUM_AND_ABOVE\",\n BLOCK_LOW_AND_ABOVE = \"BLOCK_LOW_AND_ABOVE\",\n}\n\nexport enum ModelProvider {\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n Ernie = \"Ernie\",\n Doubao = \"Doubao\",\n Qwen = \"Qwen\",\n}\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ChatPath: (deployName: string, apiVersion: string) =>\n `deployments/${deployName}/chat/completions?api-version=${apiVersion}`,\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: (modelName: string) =>\n `v1beta/models/${modelName}:streamGenerateContent`,\n};\n\nexport const Baidu = {\n ExampleEndpoint: BAIDU_BASE_URL,\n ChatPath: (modelName: string) => {\n let endpoint = modelName;\n if (modelName === \"ernie-4.0-8k\") {\n endpoint = \"completions_pro\";\n }\n if (modelName === \"ernie-4.0-8k-preview-0518\") {\n endpoint = \"completions_adv_pro\";\n }\n if (modelName === \"ernie-3.5-8k\") {\n endpoint = \"completions\";\n }\n if (modelName === \"ernie-speed-8k\") {\n endpoint = \"ernie_speed\";\n }\n return `rpc/2.0/ai_custom/v1/wenxinworkshop/chat/${endpoint}`;\n },\n};\n\nexport const ByteDance = {\n ExampleEndpoint: \"https://ark.cn-beijing.volces.com/api/\",\n ChatPath: \"api/v3/chat/completions\",\n};\n\nexport const Alibaba = {\n ExampleEndpoint: ALIBABA_BASE_URL,\n ChatPath: \"v1/services/aigc/text-generation/generation\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-4o-mini\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-2024-04-09\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4o\": \"2023-10\",\n \"gpt-4o-2024-05-13\": \"2023-10\",\n \"gpt-4o-mini\": \"2023-10\",\n \"gpt-4o-mini-2024-07-18\": \"2023-10\",\n \"gpt-4-vision-preview\": \"2023-04\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n \"gemini-pro-vision\": \"2023-12\",\n};\n\nexport const DEFAULT_TTS_ENGINE = \"OpenAI-TTS\";\nexport const DEFAULT_TTS_ENGINES = [\"OpenAI-TTS\", \"Edge-TTS\"];\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\nconst openaiModels = [\n \"gpt-3.5-turbo\",\n \"gpt-3.5-turbo-1106\",\n \"gpt-3.5-turbo-0125\",\n \"gpt-4\",\n \"gpt-4-0613\",\n \"gpt-4-32k\",\n \"gpt-4-32k-0613\",\n \"gpt-4-turbo\",\n \"gpt-4-turbo-preview\",\n \"gpt-4o\",\n \"gpt-4o-2024-05-13\",\n \"gpt-4o-mini\",\n \"gpt-4o-mini-2024-07-18\",\n \"gpt-4-vision-preview\",\n \"gpt-4-turbo-2024-04-09\",\n \"gpt-4-1106-preview\",\n];\n\nconst googleModels = [\n \"gemini-1.0-pro\",\n \"gemini-1.5-pro-latest\",\n \"gemini-1.5-flash-latest\",\n \"gemini-pro-vision\",\n];\n\nconst anthropicModels = [\n \"claude-instant-1.2\",\n \"claude-2.0\",\n \"claude-2.1\",\n \"claude-3-sonnet-20240229\",\n \"claude-3-opus-20240229\",\n \"claude-3-haiku-20240307\",\n \"claude-3-5-sonnet-20240620\",\n];\n\nconst baiduModels = [\n \"ernie-4.0-turbo-8k\",\n \"ernie-4.0-8k\",\n \"ernie-4.0-8k-preview\",\n \"ernie-4.0-8k-preview-0518\",\n \"ernie-4.0-8k-latest\",\n \"ernie-3.5-8k\",\n \"ernie-3.5-8k-0205\",\n \"ernie-speed-128k\",\n \"ernie-speed-8k\",\n \"ernie-lite-8k\",\n \"ernie-tiny-8k\",\n];\n\nconst bytedanceModels = [\n \"Doubao-lite-4k\",\n \"Doubao-lite-32k\",\n \"Doubao-lite-128k\",\n \"Doubao-pro-4k\",\n \"Doubao-pro-32k\",\n \"Doubao-pro-128k\",\n];\n\nconst alibabaModes = [\n \"qwen-turbo\",\n \"qwen-plus\",\n \"qwen-max\",\n \"qwen-max-0428\",\n \"qwen-max-0403\",\n \"qwen-max-0107\",\n \"qwen-max-longcontext\",\n];\n\nexport const DEFAULT_MODELS = [\n ...openaiModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n })),\n ...openaiModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"azure\",\n providerName: \"Azure\",\n providerType: \"azure\",\n },\n })),\n ...googleModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n },\n })),\n ...anthropicModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n },\n })),\n ...baiduModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"baidu\",\n providerName: \"Baidu\",\n providerType: \"baidu\",\n },\n })),\n ...bytedanceModels.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"bytedance\",\n providerName: \"ByteDance\",\n providerType: \"bytedance\",\n },\n })),\n ...alibabaModes.map((name) => ({\n name,\n available: true,\n provider: {\n id: \"alibaba\",\n providerName: \"Alibaba\",\n providerType: \"alibaba\",\n },\n })),\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalAllowedWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://bora.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n\nexport const MYFILES_BROWSER_TOOLS_SYSTEM_PROMPT = `\n# Tools\n\n## myfiles_browser\n\nYou have the tool 'myfiles_browser' with the following functions:\nissues queries to search the file(s) uploaded in the current conversation and displays the results.\n\nThis tool is for browsing the files uploaded by the user.\n\nParts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.\n\nIf the user needs to summarize the document, they can summarize it through parts of the document.\n\nThink carefully about how the information you find relates to the user's request. Respond as soon as you find information that clearly answers the request.\n\nIssue multiple queries to the 'myfiles_browser' command only when the user's question needs to be decomposed to find different facts. In other scenarios, prefer providing a single query. Avoid single-word queries that are extremely broad and will return unrelated results.\n\nHere are some examples of how to use the 'myfiles_browser' command:\nUser: What was the GDP of France and Italy in the 1970s? => myfiles_browser([\"france gdp 1970\", \"italy gdp 1970\"])\nUser: What does the report say about the GPT4 performance on MMLU? => myfiles_browser([\"GPT4 MMLU performance\"])\nUser: How can I integrate customer relationship management system with third-party email marketing tools? => myfiles_browser([\"customer management system marketing integration\"])\nUser: What are the best practices for data security and privacy for our cloud storage services? => myfiles_browser([\"cloud storage security and privacy\"])\n\nThe user has uploaded the following files:\n`;\n"}, "dc9bb617dd6a35a0617a26a053cc378d538f031b": {"t": 1785758989.7842326, "n": 9021, "h": "165a545f8ecd25ea", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const DEFAULT_API_HOST = \"https://api.nextchat.dev\";\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const GOOGLE_BASE_URL = \"https://generativelanguage.googleapis.com\";\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\nexport const ANTHROPIC_BASE_URL = \"https://api.anthropic.com\";\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n}\n\nexport enum ApiPath {\n Cors = \"\",\n OpenAI = \"/api/openai\",\n GoogleAI = \"/api/google\",\n Anthropic = \"/api/anthropic\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n Anthropic = \"Anthropic\",\n}\n\nexport enum ModelProvider {\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n Claude = \"Claude\",\n}\n\nexport const Anthropic = {\n ChatPath: \"v1/messages\",\n ChatPath1: \"v1/complete\",\n ExampleEndpoint: \"https://api.anthropic.com\",\n Vision: \"2023-06-01\",\n};\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n SpeechPath: \"v1/audio/speech\",\n TranscriptionPath: \"v1/audio/transcriptions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ExampleEndpoint: \"https://{resource-url}/openai/deployments\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: \"v1beta/models/gemini-pro:generateContent\",\n VisionChatPath: \"v1beta/models/gemini-pro-vision:generateContent\",\n\n // /api/openai/v1/chat/completions\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\n// export const DEFAULT_SYSTEM_TEMPLATE = `\n// You are ChatGPT, a large language model trained by {{ServiceProvider}}.\n// Knowledge cutoff: {{cutoff}}\n// Current model: {{model}}\n// Current time: {{time}}\n// Latex inline: $x^2$\n// Latex block: $$e=mc^2$$\n// `;\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: \\\\(x^2\\\\) \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-3.5-turbo\";\nexport const GEMINI_SUMMARIZE_MODEL = \"gemini-pro\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo\": \"2023-12\",\n \"gpt-4-turbo-preview\": \"2023-12\",\n \"gpt-4-1106-preview\": \"2023-04\",\n \"gpt-4-0125-preview\": \"2023-12\",\n \"gpt-4-vision-preview\": \"2023-04\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n};\n\nexport const DEFAULT_TTS_MODEL = \"tts-1\";\nexport const DEFAULT_TTS_VOICE = \"alloy\";\nexport const DEFAULT_TTS_MODELS = [\"tts-1\", \"tts-1-hd\"];\nexport const DEFAULT_TTS_VOICES = [\n \"alloy\",\n \"echo\",\n \"fable\",\n \"onyx\",\n \"nova\",\n \"shimmer\",\n];\n\nexport const DEFAULT_STT_ENGINE = \"WebAPI\";\nexport const DEFAULT_STT_ENGINES = [\"WebAPI\", \"OpenAI Whisper\"];\nexport const FIREFOX_DEFAULT_STT_ENGINE = \"OpenAI Whisper\";\n\nexport const DEFAULT_MODELS = [\n {\n name: \"gpt-4\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-0613\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-32k\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-32k-0613\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-turbo\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-turbo-2024-04-09\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-turbo-preview\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-1106-preview\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-0125-preview\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-vision-preview\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-0125\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-0613\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-1106\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-16k\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-16k-0613\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gemini-pro\",\n available: true,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n },\n },\n {\n name: \"gemini-pro-vision\",\n available: true,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n },\n },\n {\n name: \"claude-instant-1.2\",\n available: true,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n },\n },\n {\n name: \"claude-2.0\",\n available: true,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n },\n },\n {\n name: \"claude-2.1\",\n available: true,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n },\n },\n {\n name: \"claude-3-opus-20240229\",\n available: true,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n },\n },\n {\n name: \"claude-3-sonnet-20240229\",\n available: true,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n },\n },\n {\n name: \"claude-3-haiku-20240307\",\n available: true,\n provider: {\n id: \"anthropic\",\n providerName: \"Anthropic\",\n providerType: \"anthropic\",\n },\n },\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n\n// some famous webdav endpoints\nexport const internalWhiteWebDavEndpoints = [\n \"https://dav.jianguoyun.com/dav/\",\n \"https://dav.dropdav.com/\",\n \"https://dav.box.com/dav\",\n \"https://nanao.teracloud.jp/dav/\",\n \"https://webdav.4shared.com/\",\n \"https://dav.idrivesync.com\",\n \"https://webdav.yandex.com\",\n \"https://app.koofr.net/dav/Koofr\",\n];\n"}, "03922622353b0db73019ae4e3061b77b54c79d25": {"t": 1785758991.2321064, "n": 6040, "h": "f29ba163150dab1f", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const DEFAULT_API_HOST = \"https://api.nextchat.dev\";\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const GOOGLE_BASE_URL = \"https://generativelanguage.googleapis.com\";\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n}\n\nexport enum ApiPath {\n Cors = \"/api/cors\",\n OpenAI = \"/api/openai\",\n GoogleAI = \"/api/google\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const LAST_INPUT_IMAGE_KEY = \"last-input-image\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n}\n\nexport enum ModelProvider {\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n}\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ExampleEndpoint: \"https://{resource-url}/openai/deployments\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: \"v1beta/models/{{model}}:generateContent\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by {{ServiceProvider}}.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: $x^2$ \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-3.5-turbo\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-turbo-preview\": \"2023-04\",\n \"gpt-4-1106-preview\": \"2023-04\",\n \"gpt-4-0125-preview\": \"2023-04\",\n \"gpt-4-vision-preview\": \"2023-04\",\n // After improvements,\n // it's now easier to add \"KnowledgeCutOffDate\" instead of stupid hardcoding it, as was done previously.\n \"gemini-pro\": \"2023-12\",\n};\n\nexport const DEFAULT_MODELS = [\n {\n name: \"gpt-4\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-0613\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-32k\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-32k-0613\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-turbo-preview\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-1106-preview\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-0125-preview\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-vision-preview\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-0125\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-0613\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-1106\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-16k\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-16k-0613\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gemini-pro\",\n available: true,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n },\n },\n {\n name: \"gemini-pro-vision\",\n available: true,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n },\n },\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n"}, "d14d998848968b238c536937ea19c5b7da72b330": {"t": 1785758992.561396, "n": 5280, "h": "45cd858988153474", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const DEFAULT_CORS_HOST = \"https://a.nextweb.fun\";\nexport const DEFAULT_API_HOST = `${DEFAULT_CORS_HOST}/api/proxy`;\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\nexport const GOOGLE_BASE_URL = \"https://generativelanguage.googleapis.com\";\n\nexport const GEMINI_BASE_URL = \"https://generativelanguage.googleapis.com/\";\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n}\n\nexport enum ApiPath {\n Cors = \"/api/cors\",\n OpenAI = \"/api/openai\",\n GoogleAI = \"/api/google\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const LAST_INPUT_IMAGE_KEY = \"last-input-image\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n Google = \"Google\",\n}\n\nexport enum ModelProvider {\n GPT = \"GPT\",\n GeminiPro = \"GeminiPro\",\n}\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ExampleEndpoint: \"https://{resource-url}/openai/deployments\",\n};\n\nexport const Google = {\n ExampleEndpoint: \"https://generativelanguage.googleapis.com/\",\n ChatPath: \"v1beta/models/gemini-pro:generateContent\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by OpenAI.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: $x^2$ \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-3.5-turbo\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-1106-preview\": \"2023-04\",\n \"gpt-4-vision-preview\": \"2023-04\",\n};\n\nexport const DEFAULT_MODELS = [\n {\n name: \"gpt-4\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-0613\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-32k\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-32k-0613\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-1106-preview\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-4-vision-preview\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-0613\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-1106\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-16k\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gpt-3.5-turbo-16k-0613\",\n available: true,\n provider: {\n id: \"openai\",\n providerName: \"OpenAI\",\n providerType: \"openai\",\n },\n },\n {\n name: \"gemini-pro\",\n available: true,\n provider: {\n id: \"google\",\n providerName: \"Google\",\n providerType: \"google\",\n },\n },\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n"}, "55641a495b4ba31b5fb596f29b84486c94466e2e": {"t": 1785758995.332116, "n": 3521, "h": "50f8b380e47c00ac", "c": "export const OWNER = \"chokiproai\";\nexport const REPO = \"ChatGPT-Plugins\";\nexport const REPO_URL = `https://github.com/${OWNER}/${REPO}`;\nexport const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;\nexport const UPDATE_URL = `${REPO_URL}#keep-updated`;\nexport const RELEASE_URL = `${REPO_URL}/releases`;\nexport const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;\nexport const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;\nexport const RUNTIME_CONFIG_DOM = \"danger-runtime-config\";\n\nexport const DEFAULT_CORS_HOST = \"https://a.nextweb.fun\";\nexport const DEFAULT_API_HOST = `${DEFAULT_CORS_HOST}/api/proxy`;\nexport const OPENAI_BASE_URL = \"https://api.openai.com\";\n\nexport enum Path {\n Home = \"/\",\n Chat = \"/chat\",\n Settings = \"/settings\",\n NewChat = \"/new-chat\",\n Masks = \"/masks\",\n Plugins = \"/plugins\",\n Auth = \"/auth\",\n}\n\nexport enum ApiPath {\n Cors = \"/api/cors\",\n OpenAI = \"/api/openai\",\n}\n\nexport enum SlotID {\n AppBody = \"app-body\",\n CustomModel = \"custom-model\",\n}\n\nexport enum FileName {\n Masks = \"masks.json\",\n Plugins = \"plugins.json\",\n Prompts = \"prompts.json\",\n}\n\nexport enum StoreKey {\n Chat = \"chat-next-web-store\",\n Access = \"access-control\",\n Config = \"app-config\",\n Mask = \"mask-store\",\n Plugin = \"plugin-store\",\n Prompt = \"prompt-store\",\n Update = \"chat-update\",\n Sync = \"sync\",\n}\n\nexport const DEFAULT_SIDEBAR_WIDTH = 300;\nexport const MAX_SIDEBAR_WIDTH = 500;\nexport const MIN_SIDEBAR_WIDTH = 230;\nexport const NARROW_SIDEBAR_WIDTH = 100;\n\nexport const ACCESS_CODE_PREFIX = \"nk-\";\n\nexport const LAST_INPUT_KEY = \"last-input\";\nexport const UNFINISHED_INPUT = (id: string) => \"unfinished-input-\" + id;\n\nexport const STORAGE_KEY = \"chatgpt-next-web\";\n\nexport const REQUEST_TIMEOUT_MS = 60000;\n\nexport const EXPORT_MESSAGE_CLASS_NAME = \"export-markdown\";\n\nexport enum ServiceProvider {\n OpenAI = \"OpenAI\",\n Azure = \"Azure\",\n}\n\nexport const OpenaiPath = {\n ChatPath: \"v1/chat/completions\",\n UsagePath: \"dashboard/billing/usage\",\n SubsPath: \"dashboard/billing/subscription\",\n ListModelPath: \"v1/models\",\n};\n\nexport const Azure = {\n ExampleEndpoint: \"https://{resource-url}/openai/deployments/{deploy-id}\",\n};\n\nexport const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang\nexport const DEFAULT_SYSTEM_TEMPLATE = `\nYou are ChatGPT, a large language model trained by OpenAI.\nKnowledge cutoff: {{cutoff}}\nCurrent model: {{model}}\nCurrent time: {{time}}\nLatex inline: $x^2$ \nLatex block: $$e=mc^2$$\n`;\n\nexport const SUMMARIZE_MODEL = \"gpt-3.5-turbo\";\n\nexport const KnowledgeCutOffDate: Record<string, string> = {\n default: \"2021-09\",\n \"gpt-4-1106-preview\": \"2023-04\",\n \"gpt-4-vision-preview\": \"2023-04\",\n};\n\nexport const DEFAULT_MODELS = [\n {\n name: \"gpt-4\",\n available: true,\n },\n {\n name: \"gpt-4-0613\",\n available: true,\n },\n {\n name: \"gpt-4-32k\",\n available: true,\n },\n {\n name: \"gpt-4-32k-0613\",\n available: true,\n },\n {\n name: \"gpt-4-1106-preview\",\n available: true,\n },\n {\n name: \"gpt-4-vision-preview\",\n available: true,\n },\n {\n name: \"gpt-3.5-turbo\",\n available: true,\n },\n {\n name: \"gpt-3.5-turbo-0613\",\n available: true,\n },\n {\n name: \"gpt-3.5-turbo-1106\",\n available: true,\n },\n {\n name: \"gpt-3.5-turbo-16k\",\n available: true,\n },\n {\n name: \"gpt-3.5-turbo-16k-0613\",\n available: true,\n },\n] as const;\n\nexport const CHAT_PAGE_SIZE = 15;\nexport const MAX_RENDER_MSG_COUNT = 45;\n"}}}}