Skip to content

Commit 0648186

Browse files
author
Kerwin
committed
fix: 无法保存基本设置(Close #190)
1 parent a7b3732 commit 0648186

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

service/src/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -802,11 +802,6 @@ router.post('/setting-base', rootAuth, async (req, res) => {
802802
try {
803803
const { apiKey, apiModel, apiBaseUrl, accessToken, timeoutMs, reverseProxy, socksProxy, socksAuth, httpsProxy } = req.body as Config
804804

805-
if (apiModel === 'ChatGPTAPI' && !isNotEmptyString(apiKey))
806-
throw new Error('Missing OPENAI_API_KEY environment variable.')
807-
else if (apiModel === 'ChatGPTUnofficialProxyAPI' && !isNotEmptyString(accessToken))
808-
throw new Error('Missing OPENAI_ACCESS_TOKEN environment variable.')
809-
810805
const thisConfig = await getOriginConfig()
811806
thisConfig.apiKey = apiKey
812807
thisConfig.apiModel = apiModel

0 commit comments

Comments
 (0)