feat: use FactExtractor
All checks were successful
CI / verify (push) Successful in 11s

This commit is contained in:
2026-05-17 23:41:02 +09:00
parent 4ef1b89a2d
commit 600f5ff0bc
7 changed files with 106 additions and 90 deletions

View File

@@ -8,17 +8,18 @@ describe('sleepMemory', () => {
memory,
now: '2026-05-01T10:00:00.000Z',
models: {
memoryExtraction: {
factExtractor: {
async extract(input) {
expect(input.formattedMessageHistory).toContain('user@2026-05-01T15:00:00.000Z: 나는 타입스크립트를 2025년부터 시작했어');
expect(input.instruction).toContain('Objectivize');
return [
{
statement: 'The user started TypeScript in 2025.',
topics: ['user', 'TypeScript', '2025'],
confidence: 0.9,
},
];
if (input.includes('Seed:')) {
return { statement: 'Mina remembers stable details.', topics: [{ name: 'persona' }, { name: 'Mina' }] };
}
expect(input).toContain('user@2026-05-01T15:00:00.000Z: 나는 타입스크립트를 2025년부터 시작했어');
expect(input).toContain('Objectivize');
return {
statement: 'The user started TypeScript in 2025.',
topics: [{ name: 'user' }, { name: 'TypeScript' }, { name: '2025' }],
confidence: 0.9,
};
},
},
},