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 [