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

feat: complete bing styles (bing is passed tone style)

Daniel Avila26e7a715e0cf
diff --git a/api/app/clients/bingai.js b/api/app/clients/bingai.js
index dcf150d1cf..0ed57172b9 100644
--- a/api/app/clients/bingai.js
+++ b/api/app/clients/bingai.js
@@ -2,7 +2,7 @@ require('dotenv').config();
const { KeyvFile } = require('keyv-file');
const askBing = async ({ text, onProgress, convo }) => {
- const { BingAIClient } = (await import('@waylaidwanderer/chatgpt-api'));
+ const { BingAIClient } = await import('@waylaidwanderer/chatgpt-api');
const bingAIClient = new BingAIClient({
// "_U" cookie from bing.com
@@ -11,7 +11,7 @@ const askBing = async ({ text, onProgress, convo }) => {
// cookies: '',
debug: false,
cache: { store: new KeyvFile({ filename: './data/cache.json' }) },
- proxy: process.env.PROXY || null,
+ proxy: process.env.PROXY || null
});
let options = { onProgress };
@@ -19,8 +19,15 @@ const askBing = async ({ text, onProgress, convo }) => {
options = { ...options, ...convo };
}
- if (options?.jailbreakConversationId == 'false')
- options.jailbreakConversationId = false
+ if (options?.jailbreakConversationId == 'false') {
+ options.jailbreakConversationId = false;
+ }
+
+ if (convo.toneStyle) {
+ options.toneStyle = convo.toneStyle;
+ }
+
+ console.log('bing options', options);
const res = await bingAIClient.sendMessage(text, options);