feat: add pluggable fact extraction pipeline
This commit is contained in:
18
src/ingestion/types.ts
Normal file
18
src/ingestion/types.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user