From 1455261a225a9abeb4fb1e6a61563f57ca109188 Mon Sep 17 00:00:00 2001 From: Vinlic Date: Thu, 25 Apr 2024 14:38:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E8=BD=AE=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E4=B8=8B=E5=9B=BE=E5=83=8F=E7=94=9F=E6=88=90=E5=B9=BB?= =?UTF-8?q?=E8=A7=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/controllers/chat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/controllers/chat.ts b/src/api/controllers/chat.ts index ed3b45a..582322e 100644 --- a/src/api/controllers/chat.ts +++ b/src/api/controllers/chat.ts @@ -361,7 +361,7 @@ function messagesPrepare(messages: any[], refs: any[] = []) { return (content += `<|im_start|>${message.role || "user"}\n${ message.content }<|im_end|>\n`); - }, ""); + }, "").replace(/\!\[.+\]\(.+\)/g, ""); logger.info("\n对话合并:\n" + content); return [ {