From cda36ed4fc0fbbad252238df6a5c060030d7ed44 Mon Sep 17 00:00:00 2001 From: Yanyutin753 <132346501+Yanyutin753@users.noreply.github.com> Date: Fri, 5 Apr 2024 19:12:47 +0800 Subject: [PATCH] fix the position of "\n" --- 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 88ddd1f..9c37aaf 100644 --- a/src/api/controllers/chat.ts +++ b/src/api/controllers/chat.ts @@ -389,7 +389,7 @@ function messagesPrepare(messages: any[]) { return _content + `\n${message.role || "user"}:${v["text"] || ""}`; }, content); } - return content += `${message.role || 'user'}:${wrapUrlsToTags(message.content)}\n`; + return content += `\n${message.role || 'user'}:${wrapUrlsToTags(message.content)}`; }, ''); logger.info("\n对话合并:" + content);