From 1a3327cc8da4fe30bcfe12983be026c4903987a1 Mon Sep 17 00:00:00 2001 From: Vinlic Date: Sat, 13 Apr 2024 02:14:28 +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=EF=BC=8C=E6=97=A0=E6=B3=95=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E5=94=A4=E8=B5=B7=E8=81=94=E7=BD=91=E6=A3=80=E7=B4=A2=E7=9A=84?= =?UTF-8?q?=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 8050da0..e228a59 100644 --- a/src/api/controllers/chat.ts +++ b/src/api/controllers/chat.ts @@ -392,7 +392,7 @@ function messagesPrepare(messages: any[]) { return _content + `${message.role || "user"}:${v["text"] || ""}\n`; }, content); } - return content += `${message.role || 'user'}:${wrapUrlsToTags(message.content)}\n`; + return content += `${message.role || 'user'}:${message.role == 'user' ? wrapUrlsToTags(message.content) : message.content}\n`; }, ''); logger.info("\n对话合并:\n" + content); return [