mirror of
https://github.com/LLM-Red-Team/step-free-api.git
synced 2025-10-15 07:31:43 +00:00
多轮对话优化
This commit is contained in:
@@ -395,10 +395,7 @@ function messagesPrepare(convId: string, messages: any[]) {
|
||||
}, content);
|
||||
}
|
||||
return (content += `${message.role || "user"}:${message.content}\n`);
|
||||
}, "")
|
||||
.replace(/[\n"\\]/g, function(e) {
|
||||
return "\\" + e.charCodeAt(0).toString(16) + " "
|
||||
});
|
||||
}, "");
|
||||
const json = JSON.stringify({
|
||||
chatId: convId,
|
||||
messageInfo: {
|
||||
|
Reference in New Issue
Block a user