Jack the CatBot is a LLM-based chatbot designed to answer questions based on the content of PDF files. It utilizes the Gradio library for creating a user-friendly interface and LangChain for Natural Language Processing tooling.
- Process PDF files and store them in a vector database.
- Answer user queries extracting relevant information from the database and generating responses using an LLM.
- Maintain chat history and automatically summarize it when surpasses a certain number of tokens.
- Use Python code execution agent for complex queries.
- LangSmith integration.
Before running the chatbot, ensure that you have the required dependencies installed. You can use:
conda create -n chatbot python=3.11
pip install -r requirements.txt
The chatbot uses a configuration file (config.py) to specify the necessary paramaters. Make sure to update the configuration file with the appropriate values if you wanted to try another model, embeddings or parameters.
- Place your keys into the .env file.
- Place some PDF files into the docs folder.
- Run an instance of the app.
- Click the "Send" button to submit your query.
- View the chat history and responses in the interface.
To run the chatbot, execute the following command:
cd server
python mock_interface.py