Build a chatbot powered by LlamaIndex that augments GPT 4 with the content of your private documents. This versatile application allows you to interact with any document in a conversational manner, making it easier to find information or learn from the document's contents.
- Utilizes Streamlit's
st.chat_input
for taking user queries andst.chat_message
for displaying both user queries and model responses. - Leverages LlamaIndex to load, index your private documents, and create a chat engine. This engine retrieves context from the indexed data to respond to each user query effectively.
To interact with GPT 3.5, you'll need an OpenAI API key:
- Visit OpenAI API Keys.
- Click on the
+ Create new secret key
button. - Optionally, enter an identifier name and click on the
Create secret key
button.
To run this app locally, follow these steps:
-
Clone the Repository:
git clone https://github.com/bdhaval/private-document-chat cd private-document-chat
-
Set Up a Python Environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install Dependencies:
pip install -r requirements.txt
-
Add Your Private Data:
Add your private data in the
data
folder -
Run the Application:
streamlit run app.py
-
Access the App:
Open your web browser and go to http://localhost:8501.