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