fixed memory bank query

This commit is contained in:
MaxRobinsonTheGreat 2024-04-27 23:36:58 -05:00
parent 81cdc718bd
commit 04eb3d07f5
2 changed files with 5 additions and 1 deletions

View file

@ -127,7 +127,7 @@ export const queryList = [
name: '!savedPlaces',
description: 'List all saved locations.',
perform: async function (agent) {
return "Saved place names: " + Object.keys(agent.memory_bank.places).join(', ');
return "Saved place names: " + agent.memory_bank.getKeys();
}
}
];

View file

@ -18,4 +18,8 @@ export class MemoryBank {
loadJson(json) {
this.memory = json;
}
getKeys() {
return Object.keys(this.memory).join(', ')
}
}