mirror of
https://github.com/Chanzhaoyu/chatgpt-web.git
synced 2025-02-16 09:55:28 +00:00
feat: 增加 ChatGPTUnofficialProxyAPI 的模型自定义配置 (#632)
* feat: 增加 ChatGPTUnofficialProxyAPI 的模型自定义配置(#618) * perf: 修改判断 --------- Co-authored-by: ChenZhaoYu <790348264@qq.com>
This commit is contained in:
parent
e30217542d
commit
9c6a3d6110
@ -67,10 +67,13 @@ let api: ChatGPTAPI | ChatGPTUnofficialProxyAPI
|
||||
apiModel = 'ChatGPTAPI'
|
||||
}
|
||||
else {
|
||||
const OPENAI_API_MODEL = process.env.OPENAI_API_MODEL
|
||||
const options: ChatGPTUnofficialProxyAPIOptions = {
|
||||
accessToken: process.env.OPENAI_ACCESS_TOKEN,
|
||||
debug: true,
|
||||
}
|
||||
if (isNotEmptyString(OPENAI_API_MODEL))
|
||||
options.model = OPENAI_API_MODEL
|
||||
|
||||
if (isNotEmptyString(process.env.API_REVERSE_PROXY))
|
||||
options.apiReverseProxyUrl = process.env.API_REVERSE_PROXY
|
||||
|
Loading…
x
Reference in New Issue
Block a user