https://github.com/erenisci/ai-docs
AI-Docs is an advanced AI-powered chatbot that uses Retrieval-Augmented Generation (RAG) to answer user queries based on stored PDF documents. The chatbot integrates FastAPI for the backend and React (Vite) for the frontend.
git clone https://github.com/erenisci/rag-implementation cd rag-implementation
Navigate to the backend
directory and install dependencies:
cd backend python -m venv venv source venv/bin/activate # MacOS/Linux venv\Scripts\activate # Windows pip install -r requirements.txt
Navigate to the frontend
directory and install dependencies:
cd frontend npm install
cd backend uvicorn src.api:app --host 127.0.0.1 --port 8000 --reload
cd frontend npm run dev
The frontend will be available at http://localhost:5173
docker-compose -f docker-compose.build.yml up --build -d
docker pull erenisci/rag-implementation:backend docker pull erenisci/rag-implementation:frontend
docker-compose -f docker-compose.image.yml up -d
docker run -d -p 8000:8000 erenisci/rag-implementation:backend docker run -d -p 5173:3000 erenisci/rag-implementation:frontend
Method | Endpoint | Description |
---|---|---|
POST | /ask/ | Sends a query to the chatbot. |
GET | /get-chats/ | Retrieves all stored chat sessions. |
GET | /get-chat-history/{chat_id} | Fetches messages from a specific chat. |
DELETE | /delete-chat/{chat_id} | Deletes a specific chat. |
GET | /list-pdfs/ | Lists all stored PDFs. |
POST | /upload-pdf/ | Uploads a PDF file for processing. |
POST | /process-pdfs/ | Processes all uploaded PDFs. |
DELETE | /delete-pdf/ | Deletes a specific PDF file. |
Contributions are welcome! If you'd like to improve the project, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.