This project demonstrates how to build a Python app powered by GPT and Google Drive. This combination is made possible by LangChain's Google Drive document loader and serves as a foundation for an infinite number of great apps
LangChain is a framework for building complex LLM powered apps. It provides functionalities like:
- Importing and transforming data so that it's usable with ChatGPT.
- Allowing your LLM powered app to interact with the outside world.
- Making it easy to swap out your current LLM for a new one without rewriting a lot of code.
- Providing retries with exponential backoffs for free.
- Python 3.6 or higher
- OpenAI account
- Google Drive API credentials
-
Clone the repo:
git clone https://github.com/fonckchain/gdrive-chatgpt
-
Install the required Python packages:
pip install openai langchain pypdf2 chroma tiktoken google-api-python-client google-auth-httplib2 google-auth-oauthlib
-
Set your OpenAI API key as an environment variable:
export OPENAI_API_KEY='your-api-key'
-
Replace
YOUR_FOLDER_ID
in thefolder_id
variable with your Google Drive folder ID. -
"Run python file"
-
When prompted, enter your query.
If you have any questions, feel free to contact me at [email protected]
- LangChain
- OpenAI
- Original guide made by Greg Baugues