This repository contains my final degree project, it enables users to interact with their documents using a chat interface. It leverages OpenAI's language model and Google Drive integration to provide a conversational experience.
chat.py
: This script creates a Streamlit web application that lets the user interact with the documents loaded in the DeepLake instance, generating chatbot responses using OpenAI GPT-3.5-turbo-16k.templates/prompt.py
: Prompt created with the instructions of how the LLM has to act.
Before you begin, ensure you have the following installed:
- Python (version 3.6 or higher)
Create your own service account in Google Cloud, you can follow the instructions here and save the JSON file with the keys in the working repository as credential-key.json
. Also, you have to share the Google Drive folder with the service account mail.
-
Clone the repository and navigate to the project directory:
git clone https://github.com/alexiavp/Chat-with-docs.git cd Chat-with-docs
-
Install all the required dependencies with
pip
:pip install -r requirements.txt
-
Set up API keys:
- Obtain an OpenAI API key.
- Obtain your Activeloop credentials (username and token).
-
Run the main script:
streamlit run chat.py
-
Enter your OpenAI API key and Activeloop credentials in the sidebar, making sure are correctly writed.
-
Use the chat interface to interact with your documents.
- Document Loading: Automatically downloads documents from Google Drive.
- Chat Interface: Interact with documents using a conversational interface.
- Question-Answering: Use OpenAI's language model to answer user queries.
- OpenAI for providing the powerful language model.
- Activeloop for the data versioning and collaboration tools.