Python, Langchain, OpenAI, & Pinecone stack
Imagine if ChatGPT had context of your specific data and prioritized it while answering. This project allows you to easily take some data that you have (like a Wiki, knowledge base, etc.), and allows you to query OpenAI with the context of your own data.
- Get an
OPENAI_API_KEY
from your openai.com account. NOTE: You may need to pay $ for this. I tried the free version but it didn't work properly because I kept getting rate limited. - Setup a free Pinecone DB instance and grab the
PINECONE_API_KEY
andPINECONE_ENV
variables. - Create a file called
.env
with the environment variables. It should be based on the.env.example
file. - Install the Dependencies with
pip install -r requirements.txt
- Run
python loader.py
(one time) to load up some documents into the Pincone Vector DB, and use the Embeddings to save them in a way that can be easily queried later.
Run python main.py
to query the Wiki system with your questions.
- Python is one of the most popular programming languages and is the de facto Language for AI/ML work.
- Langchain is a framework for developing applications powered by language models.
- OpenAI is an AI research and deployment company. They have amazing tools and an API that allows easy access.
- Pinecone is a cloud hosted Vector Database, which allows your AI to have long-term memory.