This project is a small chatbot for interrogating PDF documents with Gemini.
Each user can have multiple and varied conversations, each conversation can have multiple messages, and each conversation can be linked to a document. From here the various entities for the database are derived:
- Users
- Conversations
- Messages
- Documents
you can find the API documentation in the postman.json
file. Also you cand find some files for testing on testfiles
folder.
Here the user authenticates, uploads a pdf file, the document is vectorized and saved to the vector store. Then, the user creates a conversation and proceeds to interrogate the document via chat. The LLM enhances its context by making use of the message history.
The API allows you to interrogate the document of your choice and also to retrieve the text sources (pages and lines).
- Langchain
- Express
- TypeORM
- Zod
- Postgres
- PGVector
npm install
docker compose build
docker compose up -d
npm run dev
npm run build
npm run test
openssl rand -hex 64