fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
Showing only changes of commit 4fb5402987 - Show all commits

View file

@ -266,12 +266,14 @@ export class ChatServices {
let memory; let memory;
if (user && !this.memoryMap[user.userSystemId]) { if (user && !this.memoryMap[user.userSystemId]) {
this.memoryMap[user.userSystemId] = new BufferWindowMemory({ memory = new BufferWindowMemory({
returnMessages: true, returnMessages: true,
memoryKey: 'chat_history', memoryKey: 'chat_history',
inputKey: 'input', inputKey: 'input',
k: 2 k: 2
}); });
this.memoryMap[user.userSystemId] = memory;
} }
else else
{ {