A Multi-Modal Chatbot with LangChain that also supports the agentic RAG
The ChatBot supports:
- Chat with your documents using basic RAG
- Query "Paperswithcode" site to get a gist of recent papers on any topic
- Generate images using DallE-3
The code base has been organized into the following folders:
docs
: Store your PDF documents in this folderservices
: Add all your agent-specific services heretools
: Create a tool for your services
The main.py
consists of the actual System Prompt and the registration of the tools.
Make sure to register your new tools here. The UI can be created using both, Gradio, and Streamlit.
Note: When using image generation, I was finding it difficult to represent images in Gradio, hence I went with Streamlit at the end. But feel free to play around.
pip install -r requirements.txt
to install all the libraries- From your terminal run,
export OPENAI_API_KEY=sk-xxxx
- Store your PDFs in the
docs
folder - If using Gradio,
python3 main.py
- If using Streamlit,
streamlit run main.py
- Once you start the app, a
chroma_persists
folder will be created along with alogs
folder
- This is a basic RAG, one can create CRAG, Rank based RAG, etc
- Showcase Chat History (currently, not showing it)
- Add more agents specific to your needs (don't forget to register it in
main.py
) - Use the
config
file to store model details, etc that are needed for RAG as well as other agents Currently, the chromaDB gets recreated for every query to RAG. Need to handle this to make ChromaDB persist (instantiate once) once the service is up.Fixed ✔️