feat: add provider-agnostic LLM extractor adapter
This commit is contained in:
@@ -17,6 +17,16 @@ export interface FactExtractor {
|
||||
extract(input: string): Promise<ExtractedFact>;
|
||||
}
|
||||
|
||||
export interface LlmTextGenerationModel {
|
||||
generateText(prompt: string): Promise<string>;
|
||||
}
|
||||
|
||||
export interface LlmFactExtractorOptions {
|
||||
model: LlmTextGenerationModel;
|
||||
instructions?: string;
|
||||
promptBuilder?: (input: string, instructions?: string) => string;
|
||||
}
|
||||
|
||||
export interface IngestStatementOptions {
|
||||
extractor: FactExtractor;
|
||||
embeddingProvider?: EmbeddingProvider;
|
||||
|
||||
Reference in New Issue
Block a user