Pluto.ai is a conversational Retrieval Augmented Generation (RAG) chatbot built with LangChain, Chainlit that uses Claude's capabilities for question-answering from documents.
git clone https://github.com/aayushxrj/Pluto.ai
cd ./Pluto.ai/
Now you can get the app up and running using either a virtual environment or Docker.
It's recommended to use a virtual environment to keep your project dependencies isolated. Follow these steps to set up a virtual environment:
- Create a new virtual environment:
python -m venv venv
- Activate the virtual environment:
./venv/Scripts/activate
source venv/bin/activate
- With your virtual environment activated, install the required dependencies using the following command:
pip install -r requirements.txt
- After installing the dependencies, you can deactivate the virtual environment:
deactivate
Ensure you have an Anthropic API key to access the Claude LLM. You can obtain an API key from the Anthropic Console.
- Create a .env file in the project root directory and add the following line, replacing your_api_key with your actual API key:
ANTHROPIC_API_KEY=your_api_key
- Run the following script to start the Chainlit server:
chainlit run app.py -w
Interact with the application through the Chainlit interface. You can upload a file and ask questions related to the file's content.
If you have Docker installed and running, you can also run the application using Docker. Follow these steps:
- Build the Docker image locally:
docker build -t aayushxrj/pluto.ai:latest .
or directly pull from Docker Hub (recommended):
docker pull aayushxrj/pluto.ai:latest
- Run the Docker container:
docker run --name pluto.ai -p 8000:8000 -e ANTHROPIC_API_KEY='your_api_key' aayushxrj/pluto.ai:latest
Replace your_api_key
with your real Anthropic API key to gain access to the Claude LLM. You can obtain an API key from the Anthropic Console.
You can access the app at http://localhost:8000/
Once the Chainlit server is running, you'll be presented with an interface to upload a file.
After uploading a file, you can type your question in the text box and hit Enter.
The application utilizes the Anthropic's API to access Claude to extract pertinent information from the uploaded file and furnish a response to your inquiry. It displays the source page, complete with page number and content, which serves as the basis for answering the question.
Thanks to Chainlit, it unveils the entire chain of thought that the RAG pipeline utilizes to arrive at the conclusive output at the end.
You can continue asking follow-up questions or upload a new file as desired.
If you wish to contribute to Project Pluto.ai, please adhere to the following steps:
- Fork the repository: Create a new branch (
git checkout -b feature/your-feature-name
) - Commit your changes: Make your modifications (
git commit -m 'Add some feature'
) - Push to the branch: Upload your changes (
git push origin feature/your-feature-name
) - Create a new Pull Request: Submit your alterations for review
Project Pluto.ai is licensed under the MIT License.