feat: close #444 use env var to disable gpt-4

This commit is contained in:
Yidadaa
2023-05-09 23:20:03 +08:00
parent 2b7f72deec
commit 7e8def50aa
6 changed files with 45 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ declare global {
PROXY_URL?: string;
VERCEL?: string;
HIDE_USER_API_KEY?: string; // disable user's api key input
DISABLE_GPT4?: string; // allow user to use gpt-4 or not
}
}
}
@@ -40,5 +41,6 @@ export const getServerSideConfig = () => {
proxyUrl: process.env.PROXY_URL,
isVercel: !!process.env.VERCEL,
hideUserApiKey: !!process.env.HIDE_USER_API_KEY,
enableGPT4: !process.env.DISABLE_GPT4,
};
};