Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,23 @@

A JupyterLab extension to add an AI-powered tutor assistant to Notebooks.

[a screencast showing an example with jupyter-ai-tutor]('https://github.com/user-attachments/assets/0f7da09e-fa19-4655-9825-09fdca764859')

It currently relies on [jupyter-ai-jupyternaut](https://github.com/jupyter-ai-contrib/jupyter-ai-jupyternaut) for the agent, it needs to be installed (`pip install jupyter_ai_tutor[server]`).

Once Jupyterlab started, the model must be configured via the menu `Settings>Jupyternaut settings` (model and API key).

## Requirements

- JupyterLab >= 4.0.0
- jupyter-ai-jupyternaut (currently the only agent compatible)

## Install

To install the extension, execute:

```bash
pip install jupyter_ai_tutor
pip install jupyter_ai_tutor[server]
```

## Uninstall
Expand Down
2 changes: 1 addition & 1 deletion binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _(*args, **kwargs):
_(sys.executable, "-m", "pip", "check")

# install the labextension
_(sys.executable, "-m", "pip", "install", "-e", ".")
_(sys.executable, "-m", "pip", "install", "-e", ".[server]")
_(sys.executable, "-m", "jupyter", "labextension", "develop", "--overwrite", ".")

# verify the environment the extension didn't break anything
Expand Down
8 changes: 1 addition & 7 deletions jupyter_ai_tutor/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from pathlib import Path

from jupyter_server.extension.application import ExtensionApp
from jupyter_server.utils import url_path_join
from traitlets import Unicode

from .handlers import ExplainHandler
Expand Down Expand Up @@ -30,10 +29,5 @@ def initialize_settings(self):

def initialize_handlers(self):
self.handlers = [
(
url_path_join(
self.serverapp.base_url, "api/jupyter-ai-tutor/explain"
),
ExplainHandler,
)
(r"/api/jupyter-ai-tutor/explain", ExplainHandler),
]
Loading