Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

fix(api): correct typo in environment variable name from "user_provide" to "user_provided" in bingai.js and chatgpt-browser.js clients and endpoints.js router

Daniel Avila6aa540c4afa2
diff --git a/api/.env.example b/api/.env.example
index 83da008446..08cd677d01 100644
--- a/api/.env.example
+++ b/api/.env.example
@@ -40,9 +40,9 @@ OPENAI_MODELS=gpt-3.5-turbo,gpt-3.5-turbo-0301,text-davinci-003,gpt-4
# BingAI Tokens: the "_U" cookies value from bing.com
# Leave it and BINGAI_USER_TOKEN blank to disable this endpoint.
-# Set to "user_providered" to allow user provided token.
-# BINGAI_TOKEN="user_providered"
-BINGAI_TOKEN=
+# Set to "user_provided" to allow user provided token.
+# BINGAI_TOKEN="user_provided"
+BINGAI_TOKEN=user_provided
# BingAI Host:
# Necessary for some people in different countries, e.g. China (https://cn.bing.com)
diff --git a/api/app/clients/bingai.js b/api/app/clients/bingai.js
index 700c7b72a9..982973a88b 100644
--- a/api/app/clients/bingai.js
+++ b/api/app/clients/bingai.js
@@ -23,7 +23,7 @@ const askBing = async ({
const bingAIClient = new BingAIClient({
// "_U" cookie from bing.com
- userToken: process.env.BINGAI_TOKEN == 'user_provide' ? token : process.env.BINGAI_TOKEN ?? null,
+ userToken: process.env.BINGAI_TOKEN == 'user_provided' ? token : process.env.BINGAI_TOKEN ?? null,
// If the above doesn't work, provide all your cookies as a string instead
// cookies: '',
debug: false,
diff --git a/api/app/clients/chatgpt-browser.js b/api/app/clients/chatgpt-browser.js
index 0844e5c173..4b51673f8b 100644
--- a/api/app/clients/chatgpt-browser.js
+++ b/api/app/clients/chatgpt-browser.js
@@ -19,7 +19,7 @@ const browserClient = async ({
// Warning: This will expose your access token to a third party. Consider the risks before using this.
reverseProxyUrl: process.env.CHATGPT_REVERSE_PROXY || 'https://bypass.churchless.tech/api/conversation',
// Access token from https://chat.openai.com/api/auth/session
- accessToken: process.env.CHATGPT_TOKEN == 'user_provide' ? token : process.env.CHATGPT_TOKEN ?? null,
+ accessToken: process.env.CHATGPT_TOKEN == 'user_provided' ? token : process.env.CHATGPT_TOKEN ?? null,
model: model,
// debug: true
proxy: process.env.PROXY || null
diff --git a/api/server/routes/endpoints.js b/api/server/routes/endpoints.js
index bd23d52a4a..57835b24ba 100644
--- a/api/server/routes/endpoints.js
+++ b/api/server/routes/endpoints.js
@@ -19,11 +19,11 @@ router.get('/', function (req, res) {
const azureOpenAI = !!process.env.AZURE_OPENAI_KEY;
const openAI = process.env.OPENAI_KEY ? { availableModels: getOpenAIModels() } : false;
const bingAI = process.env.BINGAI_TOKEN
- ? { userProvide: process.env.BINGAI_TOKEN == 'user_provide' }
+ ? { userProvide: process.env.BINGAI_TOKEN == 'user_provided' }
: false;
const chatGPTBrowser = process.env.CHATGPT_TOKEN
? {
- userProvide: process.env.CHATGPT_TOKEN == 'user_provide',
+ userProvide: process.env.CHATGPT_TOKEN == 'user_provided',
availableModels: getChatGPTBrowserModels()
}
: false;