Quickly summarize the content and get the information you need in real-time from private large unstructured documents in your Dropbox. The same tool can be used with OneDrive.
See how the tool works:
As you can see the LLM App enables AI-powered search from multiple unstructured documents like tax information from different countries, and indexes input data in real-time just after you upload files to the cloud storage.
There are 3 ways to run the app:
For a step-by-step walkthrough in real time (~7 mins) check out the video below:
- Create
.env
file in the root directory of the project, copy and paste the below config. Replace theOPENAI_API_TOKEN
configuration value with your key{OPENAI_API_KEY}
and replaceDROPBOX_LOCAL_FOLDER_PATH
with a path where Dropbox folder is located{REPLACE_WITH_DROPBOX_FOLDER_PATH}
. For example, if the current project folder isDROPBOX-SEARCH-TOOL
, you navigate to the Dropbox path in the home directory:../Dropbox/documents
. Other properties are optional to change and be default.
OPENAI_API_TOKEN={OPENAI_API_KEY}
EMBEDDER_LOCATOR=text-embedding-ada-002
EMBEDDING_DIMENSION=1536
MODEL_LOCATOR=gpt-3.5-turbo
MAX_TOKENS=200
TEMPERATURE=0.0
DROPBOX_LOCAL_FOLDER_PATH={REPLACE_WITH_DROPBOX_RELATIVE_PATH}
- From the project root folder, open your terminal and run
docker compose up
. - Navigate to
localhost:8501
on your browser when docker installion is successful.
- Make sure that Python 3.10 or above installed on your machine.
- Download and Install Pip to manage project packages.
- Create an OpenAI account and generate a new API Key: To access the OpenAI API, you will need to create an API Key. You can do this by logging into the OpenAI website and navigating to the API Key management page.
- Use your Dropbox/OneDrive account.
Then, follow the easy steps to install and get started using the sample app.
This is done with the git clone
command followed by the URL of the repository:
git clone https://github.com/pathway-labs/dropbox-ai-chat
Next, navigate to the project folder:
cd dropbox-ai-chat
Create .env
file in the root directory of the project, copy and paste the below config, and replace the {OPENAI_API_KEY}
configuration value with your key.
OPENAI_API_TOKEN={OPENAI_API_KEY}
HOST=0.0.0.0
PORT=8080
EMBEDDER_LOCATOR=text-embedding-ada-002
EMBEDDING_DIMENSION=1536
MODEL_LOCATOR=gpt-3.5-turbo
MAX_TOKENS=200
TEMPERATURE=0.0
DROPBOX_LOCAL_FOLDER_PATH="../../../mnt/c/Users/bumur/Dropbox/documents"
Replace DROPBOX_LOCAL_FOLDER_PATH with your local Dropbox folder path and optionally, you customize other values.
Create a new virtual environment in the same folder and activate that environment:
python -m venv pw-env && source pw-env/bin/activate
Install the required packages:
pip install --upgrade -r requirements.txt
You start the application by running main.py
:
python main.py
You can run the UI separately by running Streamlit app
streamlit run ui.py
command. It connects to the Pathway's backend API automatically and you will see the UI frontend is running on your browser.