UNPKG

hnswsqlite

Version:

Vector search with HNSWlib and SQLite in TypeScript.

6 lines (4 loc) 217 B
import { VectorStore } from '../../vectorStore'; export async function searchDocuments(store: VectorStore, query: number[], k: number): Promise<Array<{id: number, text: string}>> { return store.search(query, k); }