feat: 增加 ChatGPTUnofficialProxyAPI 的模型自定义配置 (#632)

* feat: 增加 ChatGPTUnofficialProxyAPI 的模型自定义配置(#618)

* perf: 修改判断

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>
main
hncboy 2 years ago committed by GitHub
parent e30217542d
commit 9c6a3d6110
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save