⚠️ NOTE: We are rebranding GPT Index as LlamaIndex! 2/19/2023: We are still in the middle of the transition. If you are interested in contributing to LlamaIndex, make sure to follow the below steps. For testing, please doimport gpt_index
instead ofimport llama_index
.
Interested in contributing to LlamaIndex? Here's how to get started!
- Bug fixes
- New features
All future tasks are tracked in Github Issues Page. Please feel free to open an issue and/or assign an issue to yourself.
Also, join our Discord for discussions: https://discord.gg/dGcwcsnxhU.
LlamaIndex is a Python package. We've tested primarily with Python versions >= 3.8. Here's a quick and dirty guide to getting your environment setup.
First, create a fork of LlamaIndex, by clicking the "Fork" button on the LlamaIndex Github page. Following these steps for more details on how to fork the repo and clone the forked repo.
Then, create a new Python virtual environment. The command below creates an environment in .venv
,
and activates it:
python -m venv .venv
source .venv/bin/activate
Install the required dependencies (this will also install gpt-index through pip install -e .
so that you can start developing on it):
pip install -r requirements.txt
Now you should be set!
Let's make sure to format/lint
our change. For bigger changes,
let's also make sure to test
it and perhaps create an example notebook
.
You can format and lint your changes with the following commands in the root directory:
make format; make lint
We run an assortment of linters: black
, isort
, mypy
, flake8
.
For bigger changes, you'll want to create a unit test. Our tests are in the tests
folder.
We use pytest
for unit testing. To run all unit tests, run the following in the root dir:
pytest tests
For changes that involve entirely new features, it may be worth adding an example Jupyter notebook to showcase this feature.
Example notebooks can be found in this folder: https://github.com/jerryjliu/gpt_index/tree/main/examples.
See these instructions to open a pull request against the main LlamaIndex repo.