jupyterlab/jupyter-ai
Fork: 324 Star: 3203 (更新于 2024-10-31 16:59:09)
license: BSD-3-Clause
Language: Python .
A generative AI extension for JupyterLab
最后发布版本: v2.25.0 ( 2024-10-08 07:52:54)
Jupyter AI
Jupyter AI is under incubation as part of the JupyterLab organization.
Jupyter AI connects generative AI with Jupyter notebooks. Jupyter AI provides a user-friendly and powerful way to explore generative AI models in notebooks and improve your productivity in JupyterLab and the Jupyter Notebook. More specifically, Jupyter AI offers:
- An
%%ai
magic that turns the Jupyter notebook into a reproducible generative AI playground. This works anywhere the IPython kernel runs (JupyterLab, Jupyter Notebook, Google Colab, Kaggle, VSCode, etc.). - A native chat UI in JupyterLab that enables you to work with generative AI as a conversational assistant.
- Support for a wide range of generative model providers, including AI21, Anthropic, AWS, Cohere, Gemini, Hugging Face, MistralAI, NVIDIA, and OpenAI.
- Local model support through GPT4All and Ollama, enabling use of generative AI models on consumer grade machines with ease and privacy.
Documentation is available on ReadTheDocs.
Requirements
You will need to have installed the following software to use Jupyter AI:
- Python 3.8 - 3.12
- JupyterLab 4 or Notebook 7
In addition, you will need access to at least one model provider.
[!IMPORTANT] JupyterLab 3 reached its end of maintenance date on May 15, 2024. As a result, we will not backport new features to the v1 branch supporting JupyterLab 3. Fixes for critical issues will still be backported until December 31, 2024. If you are still using JupyterLab 3, we strongly encourage you to upgrade to JupyterLab 4 as soon as possible. For more information, see JupyterLab 3 end of maintenance on the Jupyter Blog.
Setting Up Model Providers in a Notebook
To use any AI model provider within this notebook, you'll need the appropriate credentials, such as API keys.
Obtain the necessary credentials, such as API keys, from your model provider's platform.
You can set your keys using environment variables or in a code cell in your notebook. In a code cell, you can use the %env magic command to set the credentials as follows:
# NOTE: Replace 'PROVIDER_API_KEY' with the credential key's name,
# and replace 'YOUR_API_KEY_HERE' with the key.
%env PROVIDER_API_KEY=YOUR_API_KEY_HERE
For more specific instructions for each model provider, refer to the model providers documentation.
Installation
Below is a simplified overview of the installation and usage process. See our official documentation for details on installing and using Jupyter AI.
With pip
If you want to install both the %%ai
magic and the JupyterLab extension, you can run:
$ pip install jupyter-ai
If you are not using JupyterLab and you only want to install the Jupyter AI %%ai
magic, you can run:
$ pip install jupyter-ai-magics
With conda
As an alternative to using pip
, you can install jupyter-ai
using
Conda
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
The %%ai
magic command
The %%ai
magic works anywhere the IPython kernel runs, including JupyterLab, Jupyter Notebook, Google Colab, and Visual Studio Code.
Once you have installed the %%ai
magic, you can enable it in any notebook or the IPython shell by running:
%load_ext jupyter_ai_magics
or:
%load_ext jupyter_ai
The screenshots below are from notebooks in the examples/
directory of this package.
Then, you can use the %%ai
magic command to specify a model and natural language prompt:
Jupyter AI can also generate HTML and math to be rendered as cell output.
Jupyter AI can interpolate IPython expressions, allowing you to run prompts that include variable values.
JupyterLab extension
The Jupyter AI extension for JupyterLab offers a native UI that enables multiple users
to chat with the Jupyter AI conversational assistant. If you have JupyterLab installed,
this should be installed and activated when you install the jupyter_ai
package.
Using
For help with installing and using Jupyter AI, please see our user documentation on ReadTheDocs.
Contributing
If you would like to contribute to Jupyter AI, see our contributor documentation on ReadTheDocs.
最近版本更新:(数据更新于 2024-10-08 16:54:37)
2024-10-08 07:52:54 v2.25.0
2024-10-05 06:21:40 v2.24.1
2024-09-27 04:55:55 v2.24.0
2024-09-12 02:47:40 v2.23.0
2024-08-30 04:34:25 v2.22.0
2024-08-20 01:06:47 v2.21.0
2024-07-30 07:03:02 v2.20.0
2024-07-23 00:51:07 v2.19.1
2024-07-16 00:51:21 v2.19.0
2024-06-22 01:09:25 v2.18.1
主题(topics):
generative-ai, jupyter, jupyterlab, jupyterlab-extension
jupyterlab/jupyter-ai同语言 Python最近更新仓库
2024-11-22 02:39:01 goauthentik/authentik
2024-11-22 00:03:47 comfyanonymous/ComfyUI
2024-11-21 22:06:18 rashevskyv/dbi
2024-11-21 21:09:02 xtekky/gpt4free
2024-11-21 20:03:58 ultralytics/ultralytics
2024-11-21 00:54:04 hect0x7/JMComic-Crawler-Python