Vector Storage
A lightweight JavaScript vector database that stores document embeddings in the browser's IndexedDB and performs semantic similarity search over them using OpenAI embeddings and cosine similarity.
Vector Storage converts text documents into vector embeddings with the OpenAI embeddings API and stores them client-side in IndexedDB, so a web application can search for documents similar in meaning to a query using cosine similarity, and filter results by metadata or text content, all without a server-side database.
It manages storage size automatically with a least-recently-used eviction policy: documents are ranked by their hit counter and then by timestamp, and the least-used, oldest documents are removed first once the configured size limit is exceeded. It installs as an npm package with methods to add single or multiple text documents and search across the stored vectors.