Bug Summary:
Changed OpenAI API url/key from default https://api.openai.com/v1 to https://<external LiteLLM server>/v1.
On reboot of server, OpenAI API url/key reverted to api.openai.com
Environment
Open WebUI Version: v0.1.121
OS Ubuntu 22.04.3 LTS
Running as Docker container
Thanks
Originally created by @corticalstack on GitHub (Apr 29, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1846
# Bug Report
## Description
**Bug Summary:**
Changed OpenAI API url/key from default `https://api.openai.com/v1` to `https://<external LiteLLM server>/v1`.
On reboot of server, OpenAI API url/key reverted to api.openai.com
## Environment
- **Open WebUI Version:** v0.1.121
- **OS** Ubuntu 22.04.3 LTS
- **Running as Docker container**
Thanks
<!-- gh-comment-id:2082646546 -->
@justinh-rahb commented on GitHub (Apr 29, 2024):
Adding this tutorial for persisting it with environment variables:
https://docs.openwebui.com/tutorial/openai
@corticalstack commented on GitHub (Apr 30, 2024):
That's awesome @justinh-rahb , can confirm works to stick openai connection after restart, setting openai api as follows in docker-compose for open-webui in Portainer, for external LiteLLM:
<!-- gh-comment-id:2084887422 -->
@corticalstack commented on GitHub (Apr 30, 2024):
That's awesome @justinh-rahb , can confirm works to stick openai connection after restart, setting openai api as follows in docker-compose for open-webui in Portainer, for external LiteLLM:
```
environment:
- OPENAI_API_BASE_URLS="http://<my ip>:4000/v1"
- OPENAI_API_KEYS="sk-<my key>"
```
Thanks!
Incidentally @justinh-rahb , setting automatic1111 url/default model/image size also don't stick after reboot.
Might this also be solved by setting the appropriate environment variables? Would you know what those are?
Thanks!
<!-- gh-comment-id:2088683573 -->
@corticalstack commented on GitHub (May 1, 2024):
Incidentally @justinh-rahb , setting automatic1111 url/default model/image size also don't stick after reboot.
Might this also be solved by setting the appropriate environment variables? Would you know what those are?
Thanks!
<!-- gh-comment-id:2088801600 -->
@justinh-rahb commented on GitHub (May 1, 2024):
> Incidentally @justinh-rahb , setting automatic1111 url/default model/image size also don't stick after reboot.
>
> Might this also be solved by setting the appropriate environment variables? Would you know what those are?
>
> Thanks!
These are all of the relevant envvars:
```ini
IMAGE_GENERATION_ENGINE=automatic1111|comfyui|openai
ENABLE_IMAGE_GENERATION=True|False
AUTOMATIC1111_BASE_URL=<your Automatic1111 URL>
COMFYUI_BASE_URL=<your ComfyUI URL>
IMAGES_OPENAI_API_BASE_URL=https://api.openai.com/v1
IMAGES_OPENAI_API_KEY=sk-1234
IMAGE_GENERATION_MODEL=dall-e-3|dall-e-2|sd-1.5|etc
IMAGE_SIZE=768x768
IMAGE_STEPS=50
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @corticalstack on GitHub (Apr 29, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1846
Bug Report
Description
Bug Summary:
Changed OpenAI API url/key from default
https://api.openai.com/v1tohttps://<external LiteLLM server>/v1.On reboot of server, OpenAI API url/key reverted to api.openai.com
Environment
Thanks
@tjbck commented on GitHub (Apr 29, 2024):
Duplicate: #1022
@justinh-rahb commented on GitHub (Apr 29, 2024):
Adding this tutorial for persisting it with environment variables:
https://docs.openwebui.com/tutorial/openai
@corticalstack commented on GitHub (Apr 30, 2024):
That's awesome @justinh-rahb , can confirm works to stick openai connection after restart, setting openai api as follows in docker-compose for open-webui in Portainer, for external LiteLLM:
Thanks!
@corticalstack commented on GitHub (May 1, 2024):
Incidentally @justinh-rahb , setting automatic1111 url/default model/image size also don't stick after reboot.
Might this also be solved by setting the appropriate environment variables? Would you know what those are?
Thanks!
@justinh-rahb commented on GitHub (May 1, 2024):
These are all of the relevant envvars: