jupyter-ai
jupyter-ai copied to clipboard
jupyter lab --AiExtension.default_api_keys command results in 'no such file or directory' error
Description
According to this section in the docs the default api key can be set using a terminal command, however instead a 'no such file or directory' error is raised. https://jupyter-ai.readthedocs.io/en/latest/users/index.html#configuring-default-models-and-api-keys
Reproduce
- Open a terminal window
- run
$ jupyter lab --AiExtension.default_api_keys={'OPENAI_API_KEY': 'aa-bbb'}
[C 2024-03-05 02:28:03.740 ServerApp] No such file or directory: /home/user1/aa-bbb'
Expected behavior
Default key should be set for the user.
Context
- Operating System and version: Linux Ubuntu 22.04
- JupyterLab version:
$ jupyter --version
Selected Jupyter core packages...
IPython : 8.12.2
ipykernel : 6.25.0
ipywidgets : 8.1.1
jupyter_client : 8.1.0
jupyter_core : 5.3.0
jupyter_server : 2.12.5
jupyterlab : 4.0.12
nbclient : 0.7.4
nbconvert : 7.3.1
nbformat : 5.9.2
notebook : not installed
qtconsole : not installed
traitlets : 5.7.1
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.
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:
hello @banson-aiq could you please try with this command and see if that works?
jupyter lab --AiExtension.default_api_keys='{"OPENAI_API_KEY": "aa-bbb"}'
@eazuman thanks, that did it. One of the maintainers may want to update the docs to reflect the correct command https://jupyter-ai.readthedocs.io/en/latest/users/index.html#configuring-default-models-and-api-keys