jupyterlab / jupyter-ai

A generative AI extension for JupyterLab
https://jupyter-ai.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
3.25k stars 334 forks source link

No Jupyternaut chatbox after installing jupyter-ai #329

Closed p1Ktj1XWg1Bm closed 1 year ago

p1Ktj1XWg1Bm commented 1 year ago

Description

Reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error '...'

Expected behavior

Context

Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.

welcome[bot] commented 1 year ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

p1Ktj1XWg1Bm commented 1 year ago

My JupyterLab version is 4.0.4, and I have installed jupyter-ai. But there is no chatbox on my side bar. image

blueblued commented 1 year ago

I'm experiencing the same issue.

When I initially installed Jupyter-AI, I was able to see the chatbox. However, after I reinstalled both Jupyter and the Jupyter-AI extension (I manually deleted the relevant directories before), the chatbox disappeared. Interestingly, the Jupyter magic command %%ai still works well despite the chatbox being missing.

JasonWeill commented 1 year ago

@p1Ktj1XWg1Bm @blueblued Thanks for opening this issue! Do you see any errors related to Jupyter AI in the terminal where you start JupyterLab?

p1Ktj1XWg1Bm commented 1 year ago

The logs from the terminal: [I 2023-08-10 17:39:39.909 ServerApp] Package jupyterlab took 0.0002s to import [I 2023-08-10 17:39:41.146 ServerApp] Package jupyter_ai took 1.2330s to import [I 2023-08-10 17:39:41.219 ServerApp] Package jupyter_lsp took 0.0698s to import [W 2023-08-10 17:39:41.219 ServerApp] A _jupyter_server_extension_points function was not found in jupyter_lsp. Instead, a _jupyter_server_extension_paths function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server. [I 2023-08-10 17:39:41.248 ServerApp] Package jupyter_server_terminals took 0.0270s to import [I 2023-08-10 17:39:41.252 ServerApp] Package notebook took 0.0001s to import [I 2023-08-10 17:39:41.273 ServerApp] Package notebook_shim took 0.0001s to import [W 2023-08-10 17:39:41.273 ServerApp] A _jupyter_server_extension_points function was not found in notebook_shim. Instead, a _jupyter_server_extension_paths function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server. [I 2023-08-10 17:39:41.307 ServerApp] jupyter_ai | extension was successfully linked. [I 2023-08-10 17:39:41.308 ServerApp] jupyter_lsp | extension was successfully linked. [I 2023-08-10 17:39:41.338 ServerApp] jupyter_server_terminals | extension was successfully linked. [I 2023-08-10 17:39:41.377 ServerApp] jupyterlab | extension was successfully linked. [I 2023-08-10 17:39:41.412 ServerApp] notebook | extension was successfully linked. [I 2023-08-10 17:39:42.810 ServerApp] notebook_shim | extension was successfully linked. [I 2023-08-10 17:39:42.968 ServerApp] notebook_shim | extension was successfully loaded. [I 2023-08-10 17:39:43.055 AiExtension] Registered engine gpt3. [I 2023-08-10 17:39:43.056 AiExtension] Registered jupyter_ai server extension [I 2023-08-10 17:39:43.059 ServerApp] jupyter_ai | extension was successfully loaded. [I 2023-08-10 17:39:43.074 ServerApp] jupyter_lsp | extension was successfully loaded. [I 2023-08-10 17:39:43.080 ServerApp] jupyter_server_terminals | extension was successfully loaded. [I 2023-08-10 17:39:43.093 LabApp] JupyterLab extension loaded from /root/venv_on_armbian/lib/python3.8/site-packages/jupyterlab [I 2023-08-10 17:39:43.093 LabApp] JupyterLab application directory is /root/venv_on_armbian/share/jupyter/lab [I 2023-08-10 17:39:43.096 LabApp] Extension Manager is 'pypi'. [I 2023-08-10 17:39:43.117 ServerApp] jupyterlab | extension was successfully loaded. [I 2023-08-10 17:39:43.140 ServerApp] notebook | extension was successfully loaded. [I 2023-08-10 17:39:43.142 ServerApp] Serving notebooks from local directory: /mnt/nas [I 2023-08-10 17:39:43.142 ServerApp] Jupyter Server 2.7.0 is running at: [I 2023-08-10 17:39:43.143 ServerApp] http://aml:8888/lab [I 2023-08-10 17:39:43.143 ServerApp] http://127.0.0.1:8888/lab [I 2023-08-10 17:39:43.144 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [W 2023-08-10 17:39:43.165 ServerApp] No web browser found: Error('could not locate runnable browser'). [I 2023-08-10 17:39:43.316 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server [W 2023-08-10 17:40:00.584 LabApp] Could not determine jupyterlab build status without nodejs

JasonWeill commented 1 year ago

I see in the screen shots above that you have older versions of a couple of Jupyter AI packages installed, but it doesn't look like you've installed the monorepo that includes both magic commands and chat UI support. Can you try running pip install jupyter_ai?

p1Ktj1XWg1Bm commented 1 year ago

I see in the screen shots above that you have older versions of a couple of Jupyter AI packages installed, but it doesn't look like you've installed the monorepo that includes both magic commands and chat UI support. Can you try running pip install jupyter_ai?

I tried

pip3 install jupyter_ai --upgrade --force-reinstall

and the problem remains.

JasonWeill commented 1 year ago

When you run pip list after running the above command, what do you see for packages whose name starts with jupyter_ai?

p1Ktj1XWg1Bm commented 1 year ago

Here it is:

`pip3 list Package Version


aiohttp 3.8.5 aiosignal 1.3.1 aiosqlite 0.19.0 annotated-types 0.5.0 anyio 3.6.2 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 asttokens 2.2.1 async-lru 2.0.4 async-timeout 4.0.2 attrs 22.2.0 Babel 2.12.1 backcall 0.2.0 bardapi 0.1.27 beautifulsoup4 4.12.2 BingImageCreator 0.1.3 bleach 6.0.0 browser-cookie3 0.19.1 cachetools 4.2.4 certifi 2023.7.22 cffi 1.15.1 charset-normalizer 3.1.0 click 8.1.6 cloudscraper 1.2.71 colorama 0.4.6 comm 0.1.4 contourpy 1.1.0 cycler 0.11.0 dataclasses 0.6 debugpy 1.6.7.post1 decorator 5.1.1 deep-translator 1.11.4 defusedxml 0.7.1 edge-tts 6.1.3 EdgeGPT 0.1.26 et-xmlfile 1.1.0 exceptiongroup 1.1.2 executing 1.2.0 face-recognition-models 0.3.0 fastjsonschema 2.18.0 fonttools 4.42.0 fqdn 1.5.1 frozenlist 1.3.3 google-api-core 1.34.0 google-auth 1.35.0 google-cloud-core 1.7.3 google-cloud-translate 2.0.1 googleapis-common-protos 1.59.1 grpcio 1.56.2 grpcio-status 1.48.2 h11 0.14.0 h2 4.1.0 hpack 4.0.0 httpcore 0.16.3 httpx 0.24.1 hyperframe 6.0.1 idna 3.4 importlib-metadata 5.2.0 importlib-resources 6.0.1 ipykernel 6.25.1 ipython 8.12.2 ipython-genutils 0.2.0 ipywidgets 8.1.0 isoduration 20.11.0 jedi 0.19.0 jeepney 0.8.0 Jinja2 3.1.2 json5 0.9.14 jsonpointer 2.4 jsonschema 4.19.0 jsonschema-specifications 2023.7.1 jupyter 1.0.0 jupyter_ai 0.2.0 jupyter_ai_chatgpt 0.5.0 jupyter_client 8.3.0 jupyter-console 6.6.3 jupyter_core 5.3.1 jupyter-events 0.7.0 jupyter-lsp 2.2.0 jupyter_server 2.7.0 jupyter_server_terminals 0.4.4 jupyterlab 4.0.4 jupyterlab-pygments 0.2.2 jupyterlab_server 2.24.0 jupyterlab-widgets 3.0.8 kiwisolver 1.4.4 lxml 4.9.3 lz4 4.3.2 markdown-it-py 2.2.0 MarkupSafe 2.1.3 matplotlib 3.7.2 matplotlib-inline 0.1.6 mdurl 0.1.2 MechanicalSoup 1.3.0 miservice-fork 2.1.1 mistune 3.0.1 multidict 6.0.4 nbclient 0.8.0 nbconvert 7.7.3 nbformat 5.9.2 nest-asyncio 1.5.7 notebook 7.0.2 notebook_shim 0.2.3 numpy 1.24.4 openai 0.27.2 OpenCC 0.2 opencc-python-reimplemented 0.1.7 openpyxl 3.1.2 overrides 7.4.0 packaging 23.1 pandas 2.0.3 pandocfilters 1.5.0 parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.5.0 pip 23.2.1 pkgutil_resolve_name 1.3.10 platformdirs 3.10.0 plotly 5.15.0 prometheus-client 0.17.1 prompt-toolkit 3.0.38 protobuf 3.20.3 psutil 5.9.5 ptyprocess 0.7.0 pure-eval 0.2.2 pyasn1 0.5.0 pyasn1-modules 0.3.0 pycparser 2.21 pycryptodomex 3.18.0 pydantic 2.1.1 pydantic_core 2.4.0 Pygments 2.15.0 PyJWT 2.8.0 pyparsing 3.0.9 PySocks 1.7.1 python-dateutil 2.8.2 python-json-logger 2.0.7 pytz 2023.3 PyYAML 6.0.1 pyzmq 25.1.1 qtconsole 5.4.3 QtPy 2.3.1 referencing 0.30.2 regex 2022.10.31 requests 2.31.0 requests-toolbelt 1.0.0 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rich 13.3.2 rpds-py 0.9.2 rsa 4.9 seaborn 0.12.2 Send2Trash 1.8.2 setuptools 68.0.0 six 1.16.0 sniffio 1.3.0 soupsieve 2.4.1 stack-data 0.6.2 tenacity 8.2.2 terminado 0.17.1 tiktoken 0.4.0 tinycss2 1.2.1 tomli 2.0.1 tornado 6.3.2 tqdm 4.65.0 traitlets 5.9.0 typing_extensions 4.7.1 tzdata 2023.3 uri-template 1.3.0 urllib3 1.26.15 wcwidth 0.2.6 webcolors 1.13 webencodings 0.5.1 websocket-client 1.6.1 websockets 11.0 wheel 0.41.0 widgetsnbextension 4.0.8 yarl 1.8.2 zhipuai 1.0.7 zipp 3.16.2`

JasonWeill commented 1 year ago

Thank you very much for the update! It looks like you have Jupyter AI 0.2.0 installed, which is an older version of our package that predates the chat interface. With.JupyterLab 4, you should be running the most recent version of our Jupyter AI package, which currently is 2.0.1.

On Aug 12, 2023, at 18:57, li yunfei @.***> wrote:



Here it is:

`pip3 list Package Version


aiohttp 3.8.5 aiosignal 1.3.1 aiosqlite 0.19.0 annotated-types 0.5.0 anyio 3.6.2 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 asttokens 2.2.1 async-lru 2.0.4 async-timeout 4.0.2 attrs 22.2.0 Babel 2.12.1 backcall 0.2.0 bardapi 0.1.27 beautifulsoup4 4.12.2 BingImageCreator 0.1.3 bleach 6.0.0 browser-cookie3 0.19.1 cachetools 4.2.4 certifi 2023.7.22 cffi 1.15.1 charset-normalizer 3.1.0 click 8.1.6 cloudscraper 1.2.71 colorama 0.4.6 comm 0.1.4 contourpy 1.1.0 cycler 0.11.0 dataclasses 0.6 debugpy 1.6.7.post1 decorator 5.1.1 deep-translator 1.11.4 defusedxml 0.7.1 edge-tts 6.1.3 EdgeGPT 0.1.26 et-xmlfile 1.1.0 exceptiongroup 1.1.2 executing 1.2.0 face-recognition-models 0.3.0 fastjsonschema 2.18.0 fonttools 4.42.0 fqdn 1.5.1 frozenlist 1.3.3 google-api-core 1.34.0 google-auth 1.35.0 google-cloud-core 1.7.3 google-cloud-translate 2.0.1 googleapis-common-protos 1.59.1 grpcio 1.56.2 grpcio-status 1.48.2 h11 0.14.0 h2 4.1.0 hpack 4.0.0 httpcore 0.16.3 httpx 0.24.1 hyperframe 6.0.1 idna 3.4 importlib-metadata 5.2.0 importlib-resources 6.0.1 ipykernel 6.25.1 ipython 8.12.2 ipython-genutils 0.2.0 ipywidgets 8.1.0 isoduration 20.11.0 jedi 0.19.0 jeepney 0.8.0 Jinja2 3.1.2 json5 0.9.14 jsonpointer 2.4 jsonschema 4.19.0 jsonschema-specifications 2023.7.1 jupyter 1.0.0 jupyter_ai 0.2.0 jupyter_ai_chatgpt 0.5.0 jupyter_client 8.3.0 jupyter-console 6.6.3 jupyter_core 5.3.1 jupyter-events 0.7.0 jupyter-lsp 2.2.0 jupyter_server 2.7.0 jupyter_server_terminals 0.4.4 jupyterlab 4.0.4 jupyterlab-pygments 0.2.2 jupyterlab_server 2.24.0 jupyterlab-widgets 3.0.8 kiwisolver 1.4.4 lxml 4.9.3 lz4 4.3.2 markdown-it-py 2.2.0 MarkupSafe 2.1.3 matplotlib 3.7.2 matplotlib-inline 0.1.6 mdurl 0.1.2 MechanicalSoup 1.3.0 miservice-fork 2.1.1 mistune 3.0.1 multidict 6.0.4 nbclient 0.8.0 nbconvert 7.7.3 nbformat 5.9.2 nest-asyncio 1.5.7 notebook 7.0.2 notebook_shim 0.2.3 numpy 1.24.4 openai 0.27.2 OpenCC 0.2 opencc-python-reimplemented 0.1.7 openpyxl 3.1.2 overrides 7.4.0 packaging 23.1 pandas 2.0.3 pandocfilters 1.5.0 parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.5.0 pip 23.2.1 pkgutil_resolve_name 1.3.10 platformdirs 3.10.0 plotly 5.15.0 prometheus-client 0.17.1 prompt-toolkit 3.0.38 protobuf 3.20.3 psutil 5.9.5 ptyprocess 0.7.0 pure-eval 0.2.2 pyasn1 0.5.0 pyasn1-modules 0.3.0 pycparser 2.21 pycryptodomex 3.18.0 pydantic 2.1.1 pydantic_core 2.4.0 Pygments 2.15.0 PyJWT 2.8.0 pyparsing 3.0.9 PySocks 1.7.1 python-dateutil 2.8.2 python-json-logger 2.0.7 pytz 2023.3 PyYAML 6.0.1 pyzmq 25.1.1 qtconsole 5.4.3 QtPy 2.3.1 referencing 0.30.2 regex 2022.10.31 requests 2.31.0 requests-toolbelt 1.0.0 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rich 13.3.2 rpds-py 0.9.2 rsa 4.9 seaborn 0.12.2 Send2Trash 1.8.2 setuptools 68.0.0 six 1.16.0 sniffio 1.3.0 soupsieve 2.4.1 stack-data 0.6.2 tenacity 8.2.2 terminado 0.17.1 tiktoken 0.4.0 tinycss2 1.2.1 tomli 2.0.1 tornado 6.3.2 tqdm 4.65.0 traitlets 5.9.0 typing_extensions 4.7.1 tzdata 2023.3 uri-template 1.3.0 urllib3 1.26.15 wcwidth 0.2.6 webcolors 1.13 webencodings 0.5.1 websocket-client 1.6.1 websockets 11.0 wheel 0.41.0 widgetsnbextension 4.0.8 yarl 1.8.2 zhipuai 1.0.7 zipp 3.16.2`

— Reply to this email directly, view it on GitHubhttps://github.com/jupyterlab/jupyter-ai/issues/329#issuecomment-1676184436, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWHV4GHAMXOQXGWIXBCNCSDXVAX5NANCNFSM6AAAAAA3LHPY5A. You are receiving this because you commented.Message ID: @.***>

Niko-La commented 1 year ago

@p1Ktj1XWg1Bm where you able to get it working? @JasonWeill I am having the same issue, have open-ai working in the cell using magic commands but my chat is not working

There seems to be a problem with the Chat backend, please look at the JupyterLab server logs or contact your administrator to correct this proble

I ran !pip show jupyter-ai looks like latest package on JupyterLab 4.0.4

Name: jupyter_ai
Version: 2.1.0
Summary: A generative AI extension for JupyterLab
Home-page: 
Author: 
Author-email: Project Jupyter <jupyter@googlegroups.com>
License: BSD 3-Clause License
michaelchia commented 1 year ago

Not sure if it is the cause of your issue, but I've experienced something similar when I had an incompatible version of jupyter-ai and jupyter-ai-magics. So double check if jupyter-ai and jupyter-ai-magics have matching versions. This happens if I already installed an old version of jupyter-ai and jupyter-ai-magics and only upgraded jupyter-ai.

@JasonWeill Perhaps it should be added to the dependencies of jupyter-ai that the jupyter-ai-magics version should be == to the jupyter-ai version. Currently there is no version specification for the jupyter-ai-magics dependency in jupyter-ai.

dlqqq commented 1 year ago

@michaelchia Thank you for calling this out! I've created a new issue to make sure the versions always match after updating jupyter_ai: https://github.com/jupyterlab/jupyter-ai/issues/376

Niko-La commented 1 year ago

Not sure if it is the cause of your issue, but I've experienced something similar when I had an incompatible version of jupyter-ai and jupyter-ai-magics. So double check if jupyter-ai and jupyter-ai-magics have matching versions. This happens if I already installed an old version of jupyter-ai and jupyter-ai-magics and only upgraded jupyter-ai.

@JasonWeill Perhaps it should be added to the dependencies of jupyter-ai that the jupyter-ai-magics version should be == to the jupyter-ai version. Currently there is no version specification for the jupyter-ai-magics dependency in jupyter-ai.

Looks like im my setup has matching versions but still not connecting the chat part

python --version && pip list | grep -E 'jupyter_ai|jupyterlab'

Python 3.11.5
jupyter_ai                    2.1.0
jupyter_ai_magics             2.1.0
jupyterlab                    4.0.5
jupyterlab-git                0.41.0
jupyterlab-pygments           0.2.2
jupyterlab_server             2.24.0
jupyterlab-widgets            3.0.8

my jupyterlab is running from the official stack image image: jupyter/datascience-notebook:latest

image

cell working fine with chatgpt api

@dlqqq is there deployable docker setup that has both the cell and chat working that we can use in the mean time?