LytVector is a simple vector database for storing and searching vectors. It provides a REST API for adding vectors, retrieving vectors by ID, and performing similarity searches.
- Add vectors with metadata
- Retrieve vectors by ID
- Perform similarity searches with configurable thresholds and top-K results
- Caching for efficient repeated queries
- Dockerized for easy deployment
git clone https://github.com/IndGeek/lyt-vector.git
cd lyt-vector
cp .env.example .env
npm install
npm run build
node dist/index.js
docker-compose up --build
-
Add Vector:
POST /add- Request Body:
{ "content": "your content", "metadata": { "key": "value" } } - Response:
{ "id": "vector-id" }
- Request Body:
-
Get Vector by ID:
GET /vector/:id- Response:
{ "id": "vector-id", "vector": [0.234, 0.678, ] }
- Response:
-
Search Vectors:
POST /search- Request Body:
{ "query": "your query", "threshold": 0.5, "topK": 5 } - Response:
[ { "id": "vector-id", "score": 0.9, "metadata": { "key": "value" } },
- Request Body: