修复多轮对话下,无法重复唤起联网检索的问题

This commit is contained in:
Vinlic 2024-04-13 02:14:28 +08:00
parent cfec318bd0
commit 1a3327cc8d

View File

@ -392,7 +392,7 @@ function messagesPrepare(messages: any[]) {
return _content + `${message.role || "user"}:${v["text"] || ""}\n`; return _content + `${message.role || "user"}:${v["text"] || ""}\n`;
}, content); }, 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); logger.info("\n对话合并\n" + content);
return [ return [