fix: jailbreakConversationId=false response will be saved jailbreakConversationId='false' in database.

This commit is contained in:
Wentao Lyu 2023-03-15 00:47:17 +08:00
parent 27515cb00a
commit 7168498543
2 changed files with 6 additions and 2 deletions

View file

@ -22,8 +22,10 @@ const askBing = async ({ text, progressCallback, convo }) => {
options = { ...options, ...convo }; options = { ...options, ...convo };
} }
const res = await bingAIClient.sendMessage(text, options if (options?.jailbreakConversationId == 'false')
); options.jailbreakConversationId = false
const res = await bingAIClient.sendMessage(text, options);
return res; return res;

View file

@ -64,6 +64,8 @@ module.exports = {
if (title) { if (title) {
update.title = title; update.title = title;
} }
if (!update.jailbreakConversationId)
update.jailbreakConversationId = null
return await Conversation.findOneAndUpdate( return await Conversation.findOneAndUpdate(
{ conversationId }, { conversationId },