mirror of
https://github.com/jackhh66/ChatGPT_Web_accessToken.git
synced 2026-12-03 21:29:32 +00:00
feat: 更新依赖并兼容已存在的代理
This commit is contained in:
1 parent
31a84325d4
commit
bf48eae9fe
4 files changed
+14
-12
No files matched your search
@@ -35,6 +35,7 @@ let api: ChatGPTAPI | ChatGPTUnofficialProxyAPI
|
||||
// More Info: https://github.com/transitive-bullshit/chatgpt-api
|
||||
|
||||
if (isNotEmptyString(process.env.OPENAI_API_KEY)) {
|
||||
const OPENAI_API_BASE_URL = process.env.OPENAI_API_BASE_URL
|
||||
const OPENAI_API_MODEL = process.env.OPENAI_API_MODEL
|
||||
const model = isNotEmptyString(OPENAI_API_MODEL) ? OPENAI_API_MODEL : 'gpt-3.5-turbo'
|
||||
|
||||
@@ -44,8 +45,8 @@ let api: ChatGPTAPI | ChatGPTUnofficialProxyAPI
|
||||
debug: true,
|
||||
}
|
||||
|
||||
if (isNotEmptyString(process.env.OPENAI_API_BASE_URL))
|
||||
options.apiBaseUrl = process.env.OPENAI_API_BASE_URL
|
||||
if (isNotEmptyString(OPENAI_API_BASE_URL))
|
||||
options.apiBaseUrl = `${OPENAI_API_BASE_URL}/v1`
|
||||
|
||||
setupProxy(options)
|
||||
|
||||
|
||||
Reference in new issue
Block a user