lytvector
v1.1.0
Published
A simple vector database for storing and searching vectors.
Maintainers
Readme
LytVector
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.
Features
- 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
Clone the repository:
git clone https://github.com/IndGeek/lyt-vector.git
cd lyt-vectorCopy the enviroment variables
cp .env.example .envRunning the Project
1. Running node locally
npm install
npm run build
node dist/index.js2. Using Docker
docker-compose up --buildAPI Endpoints
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:
