Replies: 1 comment 1 reply
-
I'm not entirely sure if env var value should overwrite the config.json once it's been generated, I'd be open to hear what other people think. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bug Report
Description
If you've manually set the OpenAI API Key before and then erased it in the UI, the config.json looks like this:
If you then set the "OPENAI_API_KEY" environment variable in Docker compose, it will not overwrite the existing config.json api_keys empty value
""
.Steps to Reproduce:
Enter an OpenAI API Key in the webui save, then delete it. Enter OPENAI_API_KEY in docker compose environment variables restart the container, launch web ui and check "Settings -> Connections -> OpenAI API". The API key is blank and no OpenAI models have been loaded.
Compose Example:
Verifying "OPENAI_API_KEY" env variable inside container:
The Browser Debug network request when loading the settings page:
request:
https://<my host>/openai/api/keys
response:
{"OPENAI_API_KEYS":[""]}
Workaround:
Manually edit out the OpenAI configuration from config.json and restart the container.
Example config.json:
Expected Behavior:
For the environment variable to be ingested into the config by open-webui and overwrite whatever is currently configured in config.json.
Actual Behavior:
OpenAI API key is blank in the UI.
Environment
Open WebUI Version: v0.1.124
Ollama (if applicable): n/a
Operating System: Docker
Browser (if applicable): Firefox 124.0.1
Reproduction Details
Confirmation:
Logs and Screenshots
Browser Console Logs:
see above
Docker Container Logs:
n/a
Screenshots (if applicable):
n/a
Installation Method
Docker
Additional Information
see above
Beta Was this translation helpful? Give feedback.
All reactions