| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | export * from './types'; |
| | export * from './core'; |
| | export * from './services'; |
| | declare let implementation: any; |
| | |
| | |
| | |
| | export declare function getImplementationType(): 'native' | 'rvf' | 'wasm'; |
| | |
| | |
| | |
| | export declare function isNative(): boolean; |
| | |
| | |
| | |
| | export declare function isRvf(): boolean; |
| | |
| | |
| | |
| | export declare function isWasm(): boolean; |
| | |
| | |
| | |
| | export declare function getVersion(): { |
| | version: string; |
| | implementation: string; |
| | }; |
| | |
| | |
| | |
| | declare class VectorDBWrapper { |
| | private db; |
| | constructor(options: { |
| | dimensions: number; |
| | storagePath?: string; |
| | distanceMetric?: string; |
| | hnswConfig?: any; |
| | }); |
| | |
| | |
| | |
| | insert(entry: { |
| | id?: string; |
| | vector: Float32Array | number[]; |
| | metadata?: Record<string, any>; |
| | }): Promise<string>; |
| | |
| | |
| | |
| | insertBatch(entries: Array<{ |
| | id?: string; |
| | vector: Float32Array | number[]; |
| | metadata?: Record<string, any>; |
| | }>): Promise<string[]>; |
| | |
| | |
| | |
| | search(query: { |
| | vector: Float32Array | number[]; |
| | k: number; |
| | filter?: Record<string, any>; |
| | efSearch?: number; |
| | }): Promise<Array<{ |
| | id: string; |
| | score: number; |
| | vector?: Float32Array; |
| | metadata?: Record<string, any>; |
| | }>>; |
| | |
| | |
| | |
| | get(id: string): Promise<{ |
| | id?: string; |
| | vector: Float32Array; |
| | metadata?: Record<string, any>; |
| | } | null>; |
| | |
| | |
| | |
| | delete(id: string): Promise<boolean>; |
| | |
| | |
| | |
| | len(): Promise<number>; |
| | |
| | |
| | |
| | isEmpty(): Promise<boolean>; |
| | } |
| | export declare const VectorDb: typeof VectorDBWrapper; |
| | export declare const VectorDB: typeof VectorDBWrapper; |
| | export declare const NativeVectorDb: any; |
| | export default implementation; |
| | |