A FastAPI application implementing vector similarity search.
This project demonstrates how to build a vector similarity search system using:
- PostgreSQL with pgvector extension for vector operations
- OpenAI/Ollama Embedding models for text vectorization
- FastAPI for the REST API interface
- Docker for containerization
-
Create
.envin the root directoryOPENAI_API_KEY=your_openai_api_key
-
Start the services
docker compose up --build
Visit http://localhost:8000/docs for the Swagger UI.
- Update database schema: Edit
postgres/schema.sql - Add data: Use
scripts/load_data.py - Modify API: Edit files in
api/