jupyter-ai
jupyter-ai copied to clipboard
Contributor documentation: Add guidance on contributing a new provider
Problem
Open source contributors are opening PRs to add new providers to Jupyter AI. This is extremely helpful to everybody, and we greatly appreciate others taking the time to write and test these. However, contributors have had difficulty doing so due to subtle and mostly undocumented details of how the Python source works.
The contributor documentation should have a new section that:
- Describes how to contribute a new provider, end-to-end,
- Indicates that contributors need to run
jlpm dev-installagain to make new providers show in the UI after declaring the entry point inpyproject.toml, and - Indicates that contributors should define providers in separate files to keep third-party dependencies optional.
Just wanted to point out that the installation instruction with nodejs=20 does not work on my linux machine. Removing the version pin installs nodejs v18.18.2, which works fine with jupyter-ai. The reason is that the latest version of nodejs on the anaconda channel is v18.18.2, while the latest version on the conda-forge channel is v0.20.9. So we either have to remove the nodejs version pin or force it to install from the conda-forge channel.
conda create -n jupyter-ai python=3.11 nodejs=20
conda create -n jupyter-ai python=3.11 nodejs
conda create -n jupyter-ai python=3.11 conda-forge::nodejs