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

Config UI should allow saving when API key is passed via an environment variable #1083

Open
haesleinhuepf opened this issue Nov 2, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@haesleinhuepf
Copy link

Description

I'm trying to use OpenAI GPT4 and struggle a bit with configuration. I'm using openai and have an environment variable configured. Hence, I do not need to configure my API key in Jupyter AI. It should work without.

Reproduce

The configuration dialog says the API key is optional, but there is an error message saying I must enter it.

image

Expected behavior

Make the API key optional, and remove the error message.

Context

  • Operating System and version: Windows 10
  • Browser and version:
  • JupyterLab version: Version 4.2.5
@haesleinhuepf haesleinhuepf added the bug Something isn't working label Nov 2, 2024
@dlqqq dlqqq changed the title API key is optional but must not be empty Config UI should allow saving when API key is passed via an environment variable Nov 2, 2024
@dlqqq
Copy link
Member

dlqqq commented Nov 2, 2024

@haesleinhuepf The error isn't being produced because "Base API URL" is empty, but rather the "OPENAI_API_KEY" text field listed under the "API Keys" section is empty.

Currently, the chat panel requires that the API key be provided under the "API Keys" section, even if the API key is already specified by an environment variable. If you copy the API key again and paste it into "OPENAI_API_KEY", you will be able to save your changes in the Config UI.

Although the workaround here is simple, this is a valid usability issue that should be addressed. Thank you for reporting this to our team! I've edited the title of this issue accordingly.

@haesleinhuepf
Copy link
Author

I see. Sorry for my confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants