/** * ONNX Local Embeddings (Feature 7) * * 100% offline, no API key needed * Uses ONNX Runtime to run Sentence-BERT models locally * * Setup: * 1. npm install onnxruntime-node * 2. Download model: all-MiniLM-L6-v2 ONNX format */ import type { Embedder } from '../embeddingPipeline.js'; export interface ONNXEmbedderConfig { /** Path to the ONNX model file */ modelPath?: string; /** Maximum sequence length (default: 256) */ maxLength?: number; /** Embedding dimensions (depends on model, default: 384) */ dimensions?: number; } /** * ONNX-based local embedder * Runs entirely on your machine - no API calls! */ export declare class ONNXEmbedder implements Embedder { private modelPath; private maxLength; private dimensions; private session; private initialized; constructor(config?: ONNXEmbedderConfig); private initialize; embedText(text: string): Promise; embedDiff(diff: string): Promise; private getEmbedding; /** * Simple fallback embedding when ONNX is not available * Uses character-based hashing - good enough for testing */ private fallbackEmbedding; } /** * Create ONNX embedder from environment variables */ export declare function createONNXEmbedder(): ONNXEmbedder; //# sourceMappingURL=onnx.d.ts.map