fix chat limits update

This commit is contained in:
Emily
2024-12-23 14:37:19 +01:00
parent edc897d62a
commit 7d05a9d157
3 changed files with 6 additions and 1 deletions

View File

@@ -191,7 +191,7 @@ export async function sendMessageOnChat(text: string, pid: string, time_offset:
if (chatMessages && chatMessages.length > 0) {
messages.push(...chatMessages);
await ProjectLimitModel.updateOne({ project_id: pid }, { $inc: { ai_messages: 1 } })
await updateChatStatus(chat_id, '', false);
} else {
const roleMessage: OpenAI.Chat.Completions.ChatCompletionMessageParam = {