ai/src/memory.ts
2018-08-12 23:03:00 +09:00

18 lines
268 B
TypeScript

// 藍の記憶
import * as loki from 'lokijs';
const db = new loki('ai');
export default db;
export const contexts = db.addCollection<{
isMessage: boolean;
noteId?: string;
userId?: string;
module: string;
key: string;
}>('contexts', {
indices: ['key']
});