UNPKG

vecstore-js

Version:

A pluggable, browser-native vector database using IndexedDB with support for HNSW and local embeddings.

8 lines (7 loc) 347 B
import { Document, SearchAlgorithm } from '../types/interfaces.js'; export declare const cosineSimilarity: (a: number[], b: number[]) => number; export declare class CosineSearchAlgorithm implements SearchAlgorithm { search(queryVector: number[], documents: Document[], topK: number): Promise<(Document & { score: number; })[]>; }