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

Adds %ai error magic command to explain the most recent error #170

Merged
merged 4 commits into from
Jun 5, 2023

Conversation

JasonWeill
Copy link
Collaborator

@JasonWeill JasonWeill commented May 12, 2023

Adds a new %ai error command that explains the most recent error in the current notebook using the chosen model. Updates the documentation to mention this new magic command. Fixes #62.

image

@JasonWeill
Copy link
Collaborator Author

This is updated to incorporate the click logic from #188.

@3coins
Copy link
Collaborator

3coins commented Jun 5, 2023

@JasonWeill
Rebasing from main and submitting again should fix the CI.

@3coins
Copy link
Collaborator

3coins commented Jun 5, 2023

@JasonWeill
I tested the magic and it works great. Some minor things I noticed in the example notebook:

  1. One of the outputs bleeded into the next cell. Is this expected?
    Screen Shot 2023-06-05 at 1 58 23 PM
  2. While running the example, I had to set the env variables for the chatgpt provider, so had to add an additional cell. This misaligned the references for cell numbers in the subsequent cells and caused an error on last cell. Wondering if we should add a placeholder cell for setting the api key.

@JasonWeill
Copy link
Collaborator Author

  1. In the screen shot, the selected cell is a Markdown cell, not a continuation of the output. This shows a bug with the cell toolbar; see Cell toolbar overlaps horizontal rule in markdown cell jupyterlab#14646
  2. I typically set env variables before starting JupyterLab; I try to avoid setting them in the example files, to minimize the chance of me accidentally checking an API key in.

@JasonWeill JasonWeill merged commit b142127 into jupyterlab:main Jun 5, 2023
3coins pushed a commit to krassowski/jupyter-ai that referenced this pull request Jun 15, 2023
…rlab#170)

* Adds `%ai error` command, documents it

* Updates docs

* Updates to use `click` command parser

* Updates commands workbook
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
…rlab#170)

* Adds `%ai error` command, documents it

* Updates docs

* Updates to use `click` command parser

* Updates commands workbook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request @jupyter-ai/magics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "explain the last error" magic command
2 participants