mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-07-21 15:35:18 +02:00
fixed memory bank query
This commit is contained in:
parent
81cdc718bd
commit
04eb3d07f5
2 changed files with 5 additions and 1 deletions
|
@ -127,7 +127,7 @@ export const queryList = [
|
||||||
name: '!savedPlaces',
|
name: '!savedPlaces',
|
||||||
description: 'List all saved locations.',
|
description: 'List all saved locations.',
|
||||||
perform: async function (agent) {
|
perform: async function (agent) {
|
||||||
return "Saved place names: " + Object.keys(agent.memory_bank.places).join(', ');
|
return "Saved place names: " + agent.memory_bank.getKeys();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -18,4 +18,8 @@ export class MemoryBank {
|
||||||
loadJson(json) {
|
loadJson(json) {
|
||||||
this.memory = json;
|
this.memory = json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getKeys() {
|
||||||
|
return Object.keys(this.memory).join(', ')
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue