From c07503db29cc2ad9918f973f2fdd846937fcb550 Mon Sep 17 00:00:00 2001 From: HalcyonAlcedo <41666148+HalcyonAlcedo@users.noreply.github.com> Date: Sun, 19 Feb 2023 00:44:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2=E6=B3=A8=E5=85=A5=E6=94=BB?= =?UTF-8?q?=E5=87=BB=20(#170)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修复引用转发,默认bing模式并发 * 开启stream增加稳定性 * fix: remove queue element only in non-bing mode * 使用chatgpt-api自带的超时逻辑,文字过多时启动切换到图片输出防止被吞 * Update chat.js * 添加Bing专用的图片输出样式 * 添加chatgpt的新图片模式,临时处理切换api导致的对话异常 * 修改bing样式表 * 为图片添加外部页面缓存 * 为图片模式添加MathJax * feat: add switch for qrcode * 防止script攻击 --------- Co-authored-by: ikechan8370 --- apps/chat.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/chat.js b/apps/chat.js index 628917f..214b394 100644 --- a/apps/chat.js +++ b/apps/chat.js @@ -12,6 +12,7 @@ import { KeyvFile } from 'keyv-file' import { OfficialChatGPTClient } from '../utils/message.js' import fetch from 'node-fetch' import { deleteConversation, getConversations, getLatestMessageIdByConversationId } from '../utils/conversation.js' +import cfg from '../../../lib/config/config.js' const blockWords = Config.blockWords /** @@ -273,6 +274,14 @@ export class chatgpt extends plugin { return false } } + + if (prompt.indexOf('