| export interface UploadResponse { | |
| document_id: string | |
| filename: string | |
| text_preview: string | |
| char_count: number | |
| } | |
| export interface BuildGraphResponse { | |
| document_id: string | |
| chunks: number | |
| triples: number | |
| nodes: number | |
| edges: number | |
| cycles: string[][] | |
| warnings: string[] | |
| } | |
| export interface CausalTriple { | |
| id: string | |
| cause: string | |
| relation: string | |
| effect: string | |
| theme: string | |
| evidence: string | |
| confidence: number | |
| source_chunk_id: string | |
| } | |
| export interface GraphNode { | |
| id: string | |
| label: string | |
| type: string | |
| theme: string | |
| } | |
| export interface GraphEdge { | |
| id: string | |
| source: string | |
| target: string | |
| label: string | |
| confidence: number | |
| evidence: string | |
| theme: string | |
| } | |
| export interface GraphData { | |
| nodes: GraphNode[] | |
| edges: GraphEdge[] | |
| } | |
| export interface ChainEdge { | |
| cause: string | |
| relation: string | |
| effect: string | |
| confidence: number | |
| evidence: string | |
| } | |
| export interface CausalChain { | |
| score: number | |
| direction: string | |
| path: string[] | |
| edges: ChainEdge[] | |
| } | |
| export interface ChatResponse { | |
| answer: string | |
| chains: CausalChain[] | |
| } | |
| export interface AppSettings { | |
| openaiModel: string | |
| maxDepth: number | |
| topKChains: number | |
| confidenceThreshold: number | |
| theme: string | |
| } | |