Skip to main content

AI kernels for JupyterLite

Project description

jupyterlite-ai-kernels

Github Actions Status lite-badge

AI kernels for JupyterLite. This extension dynamically registers one kernel per configured AI provider from @jupyterlite/ai. When users open a notebook with one of these kernels, cell contents are sent as prompts to the AI model and responses are streamed back.

https://github.com/user-attachments/assets/ee5bc8b1-c0bd-4603-b2f4-a98db350d217

Requirements

  • JupyterLite >= 0.6.0
  • @jupyterlite/ai >= 0.10.0

Install

To install the extension, execute:

pip install jupyterlite-ai-kernels

Then build your JupyterLite site:

jupyter lite build

Uninstall

To remove the extension, execute:

pip uninstall jupyterlite-ai-kernels

Contributing

Development install

Note: You will need NodeJS to build the extension package.

This project uses pnpm as the package manager.

# Clone the repo to your local environment
# Change directory to the jupyterlite-ai-kernels directory
# Install package in development mode
python -m pip install -e .

# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite

# Rebuild extension Typescript source after making changes
pnpm run build

You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.

# Watch the source directory in one terminal, automatically rebuilding when needed
pnpm run watch
# Run JupyterLab in another terminal
jupyter lab

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

Development uninstall

pip uninstall jupyterlite-ai-kernels

In development mode, you will also need to remove the symlink created by jupyter labextension develop command. To find its location, you can run jupyter labextension list to figure out where the labextensions folder is located. Then you can remove the symlink named jupyterlite-ai-kernels within that folder.

Packaging the extension

See RELEASE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyterlite_ai_kernels-0.1.1.tar.gz (206.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jupyterlite_ai_kernels-0.1.1-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file jupyterlite_ai_kernels-0.1.1.tar.gz.

File metadata

  • Download URL: jupyterlite_ai_kernels-0.1.1.tar.gz
  • Upload date:
  • Size: 206.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for jupyterlite_ai_kernels-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8a49dff7a9f97baac740fcbc9d7027dab158a52a7ac77b4fb6b2fe5b3f35aa10
MD5 893a0307c8c7c80b3aa7d2d443970c38
BLAKE2b-256 057fce1769a447ac49167d984177e285e944ef667b09c85b3381cf48f3fbd0e1

See more details on using hashes here.

File details

Details for the file jupyterlite_ai_kernels-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyterlite_ai_kernels-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2876fb7249f8b189855cb05a9cc3ff098e57702dc498fb3d227fe3567eead344
MD5 cf42b205f5cf2acf8793da094ef24ac1
BLAKE2b-256 1276b1bba46382119892474f68c858dd9650187fac13704abeda17c1e7b2a530

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page