diff --git a/api/.env.example b/api/.env.example index c952ebe491..4fa5a432a1 100644 --- a/api/.env.example +++ b/api/.env.example @@ -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. diff --git a/api/app/clients/bingai.js b/api/app/clients/bingai.js index 015da79069..ca790ec43d 100644 --- a/api/app/clients/bingai.js +++ b/api/app/clients/bingai.js @@ -27,6 +27,7 @@ const askBing = async ({ // cookies: '', debug: false, cache: store, + host: process.env.BINGAI_HOST || null, proxy: process.env.PROXY || null });