feat: add pluggable fact extraction pipeline

This commit is contained in:
2026-05-11 10:54:40 +09:00
parent 9f3133a403
commit 2c6624beea
5 changed files with 135 additions and 1 deletions

18
src/ingestion/types.ts Normal file
View File

@@ -0,0 +1,18 @@
import type { AddFactInput, TopicLinkInput } from '../types/api';
export interface ExtractedFact {
statement?: string;
summary?: string | null;
source?: string | null;
confidence?: number | null;
metadata?: AddFactInput['metadata'];
topics: TopicLinkInput[];
}
export interface FactExtractor {
extract(input: string): Promise<ExtractedFact>;
}
export interface IngestStatementOptions {
extractor: FactExtractor;
}