/** * Shared LLM response parser for the extraction pipeline. * * Parses raw LLM text responses into structured extraction results. * Handles markdown fences, blocks, JSON repair, type normalization, * and confidence filtering. * * Previously named ollama-client.ts — renamed to reflect actual responsibility * now that LLM transport is handled by the LlmProvider interface. */ import type { ExtractedItem, ExtractedRelation } from "./types"; export interface ParseOptions { /** Minimum confidence to keep an extracted item */ readonly minConfidence: number; /** Set of valid type strings */ readonly validTypes: ReadonlySet; /** Map of alternative type names → canonical type names */ readonly typeMap: Readonly>; /** Default type when none matches */ readonly defaultType: string; /** Minimum content length to keep an item (0 = no minimum) */ readonly minContentLength?: number; } /** * Parse an LLM response string into structured items and relations. * * Handles: * - Markdown code fences around JSON * - reasoning blocks (some models emit these) * - Trailing comma repair * - Flexible key names ("items" / "facts", "relations" / "entities") * - Type normalization via validTypes + typeMap * - Confidence clamping and filtering */ export declare function parseExtractionResponse(raw: string, options: ParseOptions): { items: ExtractedItem[]; relations: ExtractedRelation[]; warnings: string[]; }; //# sourceMappingURL=response-parser.d.ts.map