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

JupyterLab 4 support #173

Closed
JasonWeill opened this issue May 15, 2023 · 6 comments · Fixed by #296
Closed

JupyterLab 4 support #173

JasonWeill opened this issue May 15, 2023 · 6 comments · Fixed by #296
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@JasonWeill
Copy link
Collaborator

JupyterLab 4.0.0 was released earlier today, May 15, 2023. Support JupyterLab 4 with Jupyter AI.

@JasonWeill JasonWeill added the enhancement New feature or request label May 15, 2023
@MRYingLEE
Copy link

FYI,

I failed to use Jupyter-ai in Jupyterlab 4. I once succeeded in Jupyterlab 3.6.

The cell

%%ai chatgpt -f math
Generate the 2D heat equation.

caused an error:

AuthenticationError                       Traceback (most recent call last)
Cell In[16], line 1
----> 1 get_ipython().run_cell_magic('ai', 'chatgpt -f math', 'Generate the 2D heat equation.\n')
....

File ~\anaconda3\envs\jupyterlab4\lib\site-packages\openai\api_requestor.py:687, in APIRequestor._interpret_response_line(self, rbody, rcode, rheaders, stream)
    685 stream_error = stream and "error" in resp.data
    686 if stream_error or not 200 <= rcode < 300:
--> 687     raise self.handle_error_response(
    688         rbody, rcode, resp.data, rheaders, stream_error=stream_error
    689     )
    690 return resp

AuthenticationError: <empty message>

@aarshcode
Copy link

I am also getting the same error when running %%ai chatgpt

@billyblackburn
Copy link

I get same error...gonna try notebook..i know lab is fincamentally diff than notebook

@pma2
Copy link

pma2 commented Jun 14, 2023

I'm using Jupyter Lab 4.0.2. Cell magic works, but chat button does not appear. It was visible before updating Jupyter Lab. In the pip update of Lab was:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
jupyter-ai 0.7.3 requires jupyterlab<4,>=3.5, but you have jupyterlab 4.0.2 which is incompatible.

Edit: Now is working, after trying to reinstall extensions and running with more privileges
Edit 2: It still does not work, apparently a 3.x version of Lab is still installed and was running it by mistake. Running 4.0.2 chat button is not visible in the side bar.

@JasonWeill
Copy link
Collaborator Author

Possibly relevant Discourse thread about targeting both versions: https://discourse.jupyter.org/t/jlab-extensions-that-target-both-jlab3-and-jlab4/20100

@JasonWeill
Copy link
Collaborator Author

The means of inserting a cell with prepopulated content seems to have changed in Lab 4; see jupyterlab/jupyterlab#14730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants