From a2db68f9c261885797c12677103a3390d16c87c8 Mon Sep 17 00:00:00 2001 From: Vinlic Date: Thu, 25 Apr 2024 14:46:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E9=99=A4=E5=90=88=E5=B9=B6=E4=B8=AD?= =?UTF-8?q?=E6=97=A0=E6=8F=8F=E8=BF=B0md=E5=9B=BE=E5=83=8F?= 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 582322e..e657fca 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, ""); + }, "").replace(/\!\[.*\]\(.+\)/g, ""); logger.info("\n对话合并:\n" + content); return [ {