Vibe Coding Discover

RAG

ID-based RAG FastAPI: Integration with Langchain and PostgreSQL/pgvector

★ 904404 forksPythonMITdanny-avila

FastAPI service that indexes documents with LangChain and stores embeddings in PostgreSQL/pgvector, exposing ID-based add/query/delete RAG endpoints. Built for LibreChat integration, with JWT-based per-user and entity ownership scoping on every read and delete.

Use Cases

ID-based document indexing and retrieval for LibreChatAdd RAG to an app with a file-level vector search APIQuery embeddings scoped per user or agent entityStore and search document chunks in PostgreSQL/pgvectorIngest PDF, DOCX, XLSX, PPTX and OCR-scanned filesReplace pgvector with MongoDB Atlas Vector SearchMulti-tenant document isolation via JWT owner scoping

Built With

Language
Python
Frameworks
FastAPI · LangChain · SQLAlchemy · pgvector · Uvicorn · Pydantic · sentence-transformers · Docker

Tags

rag · fastapi · pgvector · langchain · vector-database · embeddings · document-indexing · postgresql · jwt-auth · openai · multi-tenant · async · python · rest-api · file-id-scoping · mongodb-atlas