head ,csv template and limit content size

This commit is contained in:
archer
2023-08-02 14:52:27 +08:00
parent ae95a8908e
commit 58d94e1018
6 changed files with 20 additions and 9 deletions

View File

@@ -35,12 +35,13 @@ export async function saveChat({
if (chatHistory) {
promise.push(
Chat.findOneAndUpdate(
Chat.updateOne(
{ chatId, userId },
{
$push: {
content: {
$each: content
$each: content,
$slice: -50
}
},
title: content[0].value.slice(0, 20),