feat: #1640 support free gpt endpoint

This commit is contained in:
Yidadaa
2023-05-19 23:53:27 +08:00
parent e5329dc28a
commit 203ac0970d
3 changed files with 7 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ declare global {
interface ProcessEnv {
OPENAI_API_KEY?: string;
CODE?: string;
BASE_URL?: string;
PROXY_URL?: string;
VERCEL?: string;
HIDE_USER_API_KEY?: string; // disable user's api key input
@@ -38,6 +39,7 @@ export const getServerSideConfig = () => {
code: process.env.CODE,
codes: ACCESS_CODES,
needCode: ACCESS_CODES.size > 0,
baseUrl: process.env.BASE_URL,
proxyUrl: process.env.PROXY_URL,
isVercel: !!process.env.VERCEL,
hideUserApiKey: !!process.env.HIDE_USER_API_KEY,