Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve installation documentation and clarify provider dependencies #1087

Merged
merged 6 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,31 @@ If you are not using JupyterLab and you only want to install the Jupyter AI `%%a

$ pip install jupyter-ai-magics

You may need to install third-party packages, for example, to use some model providers and some file formats with Jupyter AI. For example, to use OpenAI models, in addition to your current install also run

```
pip install langchain-openai
```

To use models from Anthropic, install:

```
pip install langchain-anthropic
```

After these installs you should see the OpenAI and Anthropic models in the drop down list. If you are using Claude models on AWS Bedrock, you must also install

```
pip install langchain-aws
```

Similarly, install `langchain-<provider>` packages for other providers as well, listed [here](#model-providers).

To handle all supported use cases, you can install every dependency, which will give you access to all models currently supported by `jupyter-ai`. To install every dependency, run the following command, and then restart JupyterLab:

```
pip install jupyter-ai[all]
```
srdas marked this conversation as resolved.
Show resolved Hide resolved

### With conda

Expand All @@ -73,6 +98,12 @@ from the `conda-forge` channel, using one of the following two commands:
$ conda install -c conda-forge jupyter-ai # or,
$ conda install conda-forge::jupyter-ai

In addition, install third-party `langchain-<provider>` packages, to use some model providers. For example, if you are using OpenAI models:
srdas marked this conversation as resolved.
Show resolved Hide resolved

```
conda install conda-forge::langchain-openai
```

## The `%%ai` magic command

The `%%ai` magic works anywhere the IPython kernel runs, including JupyterLab, Jupyter Notebook, Google Colab, and Visual Studio Code.
Expand Down
31 changes: 30 additions & 1 deletion docs/source/users/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,27 @@ To install the JupyterLab extension, you can run:
pip install jupyter-ai
```

You may need to install third-party packages, for example, to use some model providers and some file formats with Jupyter AI. To handle all supported use cases, you can install every dependency, which will give you access to all models currently supported by `jupyter-ai`. To install every dependency, run the following command, and then restart JupyterLab:
You may need to install third-party packages, for example, to use some model providers and some file formats with Jupyter AI. For example, to use OpenAI models, in addition to your current install also run

```
pip install langchain-openai
```

To use models from Anthropic, install:

```
pip install langchain-anthropic
```

After these installs you should see the OpenAI and Anthropic models in the drop down list. If you are using Claude models on AWS Bedrock, you must also install

```
pip install langchain-aws
```

Similarly, install `langchain-<provider>` packages for other providers as well, listed [here](#model-providers).

To handle all supported use cases, you can install every dependency, which will give you access to all models currently supported by `jupyter-ai`. To install every dependency, run the following command, and then restart JupyterLab:

```
pip install jupyter-ai[all]
Expand Down Expand Up @@ -135,6 +155,15 @@ conda activate jupyter-ai
jupyter lab
```

In addition, install third-party `langchain-<provider>` packages, to use some model providers. For example, if you are using OpenAI models:

```
conda install conda-forge::langchain-openai
```

The list of providers and related python packages is listed [here](#model-providers).


## Uninstallation

If you installed Jupyter AI using `pip`, to remove the extension, run:
Expand Down
Loading