UNPKG

@astermind/astermind-pro

Version:

Astermind Pro - Premium ML Toolkit with Advanced RAG, Reranking, Summarization, and Information Flow Analysis

156 lines 3.21 kB
export type Kernel = 'rbf' | 'cosine' | 'poly2'; export type Settings = { ridge?: number; elmEnabled?: boolean; elmDim?: number; elmMix?: number; alpha: number; beta: number; sigma: number; kernel: Kernel; vocab: number; landmarks: number; prefilter: number; topK: number; headingW: number; chunk: number; overlap: number; penalizeLinks: boolean; stripCode: boolean; expandQuery: boolean; useStem: boolean; enableInfoFlow?: boolean; infoFlowMode: string; infoFlowWindow?: number; infoFlowCondLags?: number; }; export type Section = { heading: string; content: string; }; export type WorkerInit = { action: 'init'; payload: { settings: Partial<Settings>; chaptersPath?: string; }; }; export type WorkerAsk = { action: 'ask'; payload: { q: string; settings?: Partial<Settings>; }; }; export type WorkerReindex = { action: 'reindex'; payload?: { settings?: Partial<Settings>; }; }; export type WorkerAutoTune = { action: 'autotune'; payload?: { budget?: number; sampleQueries?: number; } & Partial<Settings>; }; export type WorkerReset = { action: 'reset'; }; export type UiToWorker = WorkerInit | WorkerAsk | WorkerReindex | WorkerAutoTune | WorkerReset; export type WorkerMsg = { type: 'ready'; } | { type: 'indexed'; docs: number; stats: string; } | { type: 'answer'; text: string; } | { type: 'results'; items: Array<{ score: number; heading: string; content: string; }>; } | { type: 'stats'; text: string; } | { type: 'kept'; items: Array<{ heading: string; p: number; rr: number; }>; } | { type: 'infoflow'; te: Record<string, number>; } | { type: 'autotune/progress'; trial: number; best: number; note: string; } | { type: 'autotune/done'; best: Settings; score: number; } | { type: 'error'; error: string; }; export type ProductionWorkerInit = { action: 'init'; payload: { model: SerializedModel; }; }; export type ProductionWorkerAsk = { action: 'ask'; payload: { q: string; settings?: Partial<Settings>; }; }; export type ProductionUiToWorker = ProductionWorkerInit | ProductionWorkerAsk; export type ProductionWorkerMsg = { type: 'ready'; } | { type: 'answer'; text: string; } | { type: 'results'; items: Array<{ score: number; heading: string; content: string; }>; } | { type: 'stats'; text: string; } | { type: 'error'; error: string; }; export type SerializedModel = { version: 'astermind-pro-v1'; savedAt: string; hash?: string; settings: any; vocab: [string, number][]; idf: number[]; chunks: Array<{ heading: string; content: string; rich?: string; level?: number; secId?: number; }>; tfidfDocs: Array<Array<[number, number]>>; landmarksIdx: number[]; landmarkMat: number[][]; denseDocs?: number[][]; }; //# sourceMappingURL=types.d.ts.map