This project demonstrates how to integrate Box and Pinecone via a python script. This coincides with a blog post on Medium. Please see that posting for more insructuctions on how to use this solution.
You will need accounts for Box, Pinecone, and OpenAI to appropriate run this demo. You will also need an OAuth Box custom application created in the Box Developer Console.
- Clone the repository:
git clone https://github.com/yourusername/box-pinecone-sample.git
cd box-pinecone-sample
- Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Create config.py file.
cp sample_config.py config.py
- Open the code in an editor of your choice. Update the credentials/Box folder ID with the information you create based on the above linked Medium Post. Save the file.
Important
DO NOT input 0 as the folder id. This will attempt to index your entire Box account. Not only is this not recommended, it will exceed rate limits, cost lots of money, and probably break.
- To create embeddings:
python main.py
- To answer queries about the created embeddings:
python query.py