This application leverages advanced AI to understand and answer questions based on PDF or CSV files. It utilizes LangChain, ChromaDB, and OpenAI's models.
- Custom file handling command for PDF/CSV files.
- Django Rest API Backend with a frontend application.
- Integration with LangChain and OpenAI's models.
- ChromaDB for embedding data storage and retrieval.
- LangChain for conversational and user feedback mechanism based on memory.
- Context limited to the provided document.
pip install -r requirements.txt
cd duha
- Run
python manage.py runserver 8000
to start the Django server on port 8000.
- Open a new terminal and start a separate (frontend) server on
python manage.py runserver 8001
- Alternatively, you may navigate to the "templates/index.html" and run a live server from VS Code.
- Drop your PDF or CSV file in the
library
folder which has been listed in .gitignore file [kindly recreate it in the duha/ directory] and run the commandpython manage.py file_handler .\library\<filename>
- Alternatively, run the command
python manage.py file_handler <path to your preferred PDF / CSV>
- The file_handler custom command handles the splitting, embedding and saving of the file chunks to a persistent ChromaDB.
The application is secured with authentication and uses Django's REST framework.
Contributions are welcome in the form of comments.