feat: add host params to bingAI.

[but seems not work in China]
This commit is contained in:
Wentao Lyu 2023-04-08 00:14:44 +08:00
parent 96b004a696
commit 06b90f6a77
2 changed files with 6 additions and 0 deletions

View file

@ -41,6 +41,11 @@ OPENAI_KEY=
# Leave it and BINGAI_USER_TOKEN blank to disable this endpoint.
BINGAI_TOKEN=
# BingAI Host:
# Necessary for some people in different countries, e.g. China (https://cn.bing.com)
# Leave it blank to use default server.
# BINGAI_HOST="https://cn.bing.com"
# BingAI User defined Token
# Allow user to set their own token by client
# Uncomment this to enable this feature.

View file

@ -27,6 +27,7 @@ const askBing = async ({
// cookies: '',
debug: false,
cache: store,
host: process.env.BINGAI_HOST || null,
proxy: process.env.PROXY || null
});