Giter VIP home page Giter VIP logo

jupyter-ai's Introduction

Jupyter AI

Welcome to Jupyter AI, which brings generative AI to Jupyter. 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, 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 and models (AI21, Anthropic, Cohere, Hugging Face, OpenAI, SageMaker, etc.).

Documentation is available on ReadTheDocs.

Requirements

  • Python 3.8 - 3.11
  • JupyterLab 4

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

First, install conda and create an environment that uses Python 3.11:

$ conda create -n jupyter-ai python=3.11
$ conda activate jupyter-ai
$ pip install jupyter_ai

If you are not using JupyterLab and you only want to install the Jupyter AI %%ai magic, skip the pip install jupyter_ai step above, and instead, run:

$ pip install jupyter_ai_magics

The %%ai magic command

The %%ai magic works anywhere the IPython kernel runs (JupyterLab, Jupyter Notebook, Google Colab, Visual Studio Code, etc.).

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:

Sample with code generation

Jupyter AI can also generate HTML and math to be rendered as cell output.

Sample with HTML and math generation

Jupyter AI can interpolate IPython expressions, allowing you to run prompts that include variable values.

Sample with code interpolation and markdown output

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.

jupyter-ai's People

Contributors

jasonweill avatar dlqqq avatar 3coins avatar ellisonbg avatar pre-commit-ci[bot] avatar mschroering avatar thorhojhus avatar

Stargazers

Edward Burns avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.