mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-14 23:22:30 +00:00
feat: add 302.AI provider
This commit is contained in:
@@ -88,6 +88,10 @@ declare global {
|
||||
SILICONFLOW_URL?: string;
|
||||
SILICONFLOW_API_KEY?: string;
|
||||
|
||||
// 302.AI only
|
||||
AI302_URL?: string;
|
||||
AI302_API_KEY?: string;
|
||||
|
||||
// custom template for preprocessing user input
|
||||
DEFAULT_INPUT_TEMPLATE?: string;
|
||||
|
||||
@@ -163,6 +167,7 @@ export const getServerSideConfig = () => {
|
||||
const isXAI = !!process.env.XAI_API_KEY;
|
||||
const isChatGLM = !!process.env.CHATGLM_API_KEY;
|
||||
const isSiliconFlow = !!process.env.SILICONFLOW_API_KEY;
|
||||
const isAI302 = !!process.env.AI302_API_KEY;
|
||||
// const apiKeyEnvVar = process.env.OPENAI_API_KEY ?? "";
|
||||
// const apiKeys = apiKeyEnvVar.split(",").map((v) => v.trim());
|
||||
// const randomIndex = Math.floor(Math.random() * apiKeys.length);
|
||||
@@ -246,6 +251,10 @@ export const getServerSideConfig = () => {
|
||||
siliconFlowUrl: process.env.SILICONFLOW_URL,
|
||||
siliconFlowApiKey: getApiKey(process.env.SILICONFLOW_API_KEY),
|
||||
|
||||
isAI302,
|
||||
ai302Url: process.env.AI302_URL,
|
||||
ai302ApiKey: getApiKey(process.env.AI302_API_KEY),
|
||||
|
||||
gtmId: process.env.GTM_ID,
|
||||
gaId: process.env.GA_ID || DEFAULT_GA_ID,
|
||||
|
||||
|
Reference in New Issue
Block a user