[GH-ISSUE #546] Persistent OpenAI Key for Continued Access to ChatGPT Models #27644

Closed
opened 2026-04-25 02:23:15 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @Grepta on GitHub (Jan 23, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/546

Is your feature request related to a problem? Please describe.
When restarting Ollama Web UI, any Open AI API key added in settings is cleared. This means each time the an API key needs to be re-added to get access to ChatGPT models.

Describe the solution you'd like
The option for persistent storage of the API key.

Describe alternatives you've considered
I haven't found an alternative, I've just re-entered the key each time the Docker container is restarted.

Additional context
I'm running Ollama Web UI in a Docker container on Windows (WSL2).

Originally created by @Grepta on GitHub (Jan 23, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/546 **Is your feature request related to a problem? Please describe.** When restarting Ollama Web UI, any Open AI API key added in settings is cleared. This means each time the an API key needs to be re-added to get access to ChatGPT models. **Describe the solution you'd like** The option for persistent storage of the API key. **Describe alternatives you've considered** I haven't found an alternative, I've just re-entered the key each time the Docker container is restarted. **Additional context** I'm running Ollama Web UI in a Docker container on Windows (WSL2).
Author
Owner

@justinh-rahb commented on GitHub (Jan 23, 2024):

You can set a container environment variable by adding -e OPENAI_API_KEY=your_api_key to your docker run command, or adding another line to the environment section of the ollama-webui service in your Docker Compose file, depending how you launched it.

<!-- gh-comment-id:1905168779 --> @justinh-rahb commented on GitHub (Jan 23, 2024): You can set a container environment variable by adding `-e OPENAI_API_KEY=your_api_key` to your `docker run` command, or adding another line to the environment section of the ollama-webui service in your Docker Compose file, depending how you launched it.
Author
Owner

@mtompkins commented on GitHub (Jan 25, 2024):

It may be worth considering moving the OpenAI implementation / API key to the user level as this bears a cost. That way the server "owner" wouldn't have to worry about users and their usage on the paid API.

<!-- gh-comment-id:1909187465 --> @mtompkins commented on GitHub (Jan 25, 2024): It may be worth considering moving the OpenAI implementation / API key to the user level as this bears a cost. That way the server "owner" wouldn't have to worry about users and their usage on the paid API.
Author
Owner

@justinh-rahb commented on GitHub (Jan 25, 2024):

It may be worth considering moving the OpenAI implementation / API key to the user level as this bears a cost. That way the server "owner" wouldn't have to worry about users and their usage on the paid API.

@mtompkins This was the previous implementation, it was moved from client-side to backend in #381

<!-- gh-comment-id:1909188692 --> @justinh-rahb commented on GitHub (Jan 25, 2024): > It may be worth considering moving the OpenAI implementation / API key to the user level as this bears a cost. That way the server "owner" wouldn't have to worry about users and their usage on the paid API. @mtompkins This was the previous implementation, it was moved from client-side to backend in #381
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#27644