mirror of
https://github.com/Chanzhaoyu/chatgpt-web.git
synced 2025-07-19 10:59:24 +00:00
chore: default API_REVERSE_PROXY
This commit is contained in:
@@ -16,7 +16,7 @@ OPENAI_API_DISABLE_DEBUG=
|
||||
# Reverse Proxy - Available on accessToken
|
||||
# Default: https://bypass.churchless.tech/api/conversation
|
||||
# More: https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy
|
||||
API_REVERSE_PROXY=https://bypass.churchless.tech/api/conversation
|
||||
API_REVERSE_PROXY=
|
||||
|
||||
# timeout
|
||||
TIMEOUT_MS=100000
|
||||
|
@@ -75,11 +75,13 @@ let api: ChatGPTAPI | ChatGPTUnofficialProxyAPI
|
||||
accessToken: process.env.OPENAI_ACCESS_TOKEN,
|
||||
debug: !disableDebug,
|
||||
}
|
||||
|
||||
if (isNotEmptyString(OPENAI_API_MODEL))
|
||||
options.model = OPENAI_API_MODEL
|
||||
|
||||
if (isNotEmptyString(process.env.API_REVERSE_PROXY))
|
||||
options.apiReverseProxyUrl = process.env.API_REVERSE_PROXY
|
||||
options.apiReverseProxyUrl = isNotEmptyString(process.env.API_REVERSE_PROXY)
|
||||
? process.env.API_REVERSE_PROXY
|
||||
: 'https://bypass.churchless.tech/api/conversation'
|
||||
|
||||
setupProxy(options)
|
||||
|
||||
|
Reference in New Issue
Block a user