langchain-sample Requirements OpenAI API key python 3.8 and later langchain (0.0.229) Install pip3 install langchain Set API key export OPENAI_API_KEY="YOUR_OPENAI_API_KEY" Create index python3 langchain_index.py Query index python3 langchain_query.py