mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
fix(llm): prevent sent message duplication
This commit is contained in:
parent
0d305cd22c
commit
aad92b57c7
@ -858,15 +858,6 @@ async function streamMessage(req: Request, res: Response) {
|
||||
}
|
||||
}
|
||||
|
||||
// Add user message to the chat (without timestamp since Message interface doesn't support it)
|
||||
chat.messages.push({
|
||||
role: 'user',
|
||||
content: enhancedContent
|
||||
});
|
||||
|
||||
// Save the updated chat
|
||||
await chatStorageService.updateChat(chat.id, chat.messages, chat.title);
|
||||
|
||||
// Create request parameters for the pipeline
|
||||
const requestParams = {
|
||||
chatNoteId: chatNoteId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user