From 0b2c8434c925ad24f821c50817349760b7b67869 Mon Sep 17 00:00:00 2001 From: Vinlic Date: Mon, 8 Apr 2024 22:23:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E8=BD=AE=E4=B8=8D=E6=B3=A8=E5=85=A5?= =?UTF-8?q?=E6=B3=A8=E6=84=8F=E5=8A=9Bprompt?= 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 9098481..72bbb22 100644 --- a/src/api/controllers/chat.ts +++ b/src/api/controllers/chat.ts @@ -373,7 +373,7 @@ function messagesPrepare(messages: any[]) { }; messages.splice(messages.length - 1, 0, newFileMessage); logger.info("注入提升尾部文件注意力system prompt"); - } else { + } else if (messages.length > 2) { let newTextMessage = { "content": "关注用户最新的消息", "role": "system"