The Retriever Augmented Generation Chat Application is a powerful tool that allows users to have dynamic and contextually rich conversations with a text document. Built with Flask, Langchain, OpenAI, and Docker, this application leverages state-of-the-art natural language processing techniques to provide an interactive and informative experience.
- Chat with Text Documents: Engage in chat conversations with text documents.
- Retrieval and Generation: Combine retrieval-based and generation-based methods for intelligent responses.
- Easy Deployment: Dockerized for easy deployment to production environments with scaling support.
- Vector Store: Utilizes Chroma DB as a vector store for efficient data retrieval.
- Customizable: Configure and adapt the application to suit your specific use cases.
[Insert link to a live demo of the application, if available.]
Before you begin, ensure you have met the following requirements:
- Docker installed on your machine.
- An API key from OpenAI for the GPT-3 model.
- Chroma DB configured and running.
To get started with this application, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/your-repo.git cd your-repo cd src export PYTHONPATH=.
make src your working directory if required
-
Install the necessary dependencies:
pip install -r requirements.txt
-
Configure your API keys and settings. Refer to the Configuration section below. You'd need to create access keys in openai. Currently we only support openai models for the chat bot
export openai_key=<your openai access key>
-
Start the application locally (checkout to develop branch for local run):
git checkout develop python doc_chat/chat_bot/app_local.py
-
Open your web browser and navigate to http://localhost:8000 to access the application.
To configure the application, follow these steps:
Create a .env file in the project root directory if it doesn't already exist.
Add the following environment variables to the .env file:
openai_key: Your API key for OpenAI's GPT-3 model. [Add any other configuration variables as needed.] Save the .env file.
Deploying the application to a production environment with proper scaling can be achieved using Docker. Follow these steps:
- Build the Docker image using the following command:
docker-compose build
- Run the Docker container with the following command:
docker-compose up
- Access the deployed application by navigating to the appropriate URL in your web browser.