minimal changes on last two chats
hypav2.ts update. last commit.
This commit is contained in:
@@ -276,14 +276,17 @@ export async function hypaMemoryV2(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add last two chats if they exist
|
// Add last two chats if they exist and are not duplicates
|
||||||
// Yeah, It's fine to remove this, but for the sake of stability, currently commented it out. Will add stabilizer for this
|
|
||||||
/*
|
|
||||||
if (lastTwoChats.length === 2) {
|
if (lastTwoChats.length === 2) {
|
||||||
chats.push(lastTwoChats[0]);
|
const [lastChat1, lastChat2] = lastTwoChats;
|
||||||
chats.push(lastTwoChats[1]);
|
if (!chats.some(chat => chat.memo === lastChat1.memo)) {
|
||||||
|
chats.push(lastChat1);
|
||||||
}
|
}
|
||||||
*/
|
if (!chats.some(chat => chat.memo === lastChat2.memo)) {
|
||||||
|
chats.push(lastChat2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
console.log("model being used: ", db.hypaModel, db.supaModelType, "\nCurrent session tokens: ", currentTokens, "\nAll chats, including memory system prompt: ", chats, "\nMemory data, with all the chunks: ", data);
|
console.log("model being used: ", db.hypaModel, db.supaModelType, "\nCurrent session tokens: ", currentTokens, "\nAll chats, including memory system prompt: ", chats, "\nMemory data, with all the chunks: ", data);
|
||||||
return {
|
return {
|
||||||
currentTokens: currentTokens,
|
currentTokens: currentTokens,
|
||||||
|
|||||||
Reference in New Issue
Block a user