mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-16 20:11:53 -05:00
[PR #2156] [MERGED] feat: save UI config changes to config.json #7708
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/2156
Author: @cheahjs
Created: 5/10/2024
Status: ✅ Merged
Merged: 5/13/2024
Merged by: @tjbck
Base:
dev← Head:feat/save-config📝 Commits (6)
058eb76feat: save UI config changes to config.jsonf712c90feat: raise an exception if a WrappedConfig is used as a response298e684feat: switch to config proxy, remove config_get/seta0dceb0fix: nested WrappedConfig breaks things5d64822refac: rename WrappedConfig to PersistedConfig0c033b5refac: rename📊 Changes
11 files changed (+627 additions, -364 deletions)
View changed files
📝
backend/apps/audio/main.py(+20 -19)📝
backend/apps/images/main.py(+89 -68)📝
backend/apps/ollama/main.py(+29 -25)📝
backend/apps/openai/main.py(+25 -18)📝
backend/apps/rag/main.py(+126 -107)📝
backend/apps/web/main.py(+13 -9)📝
backend/apps/web/routers/auths.py(+16 -16)📝
backend/apps/web/routers/configs.py(+4 -4)📝
backend/apps/web/routers/users.py(+3 -3)📝
backend/config.py(+278 -73)📝
backend/main.py(+24 -22)📄 Description
Pull Request Checklist
devbranch.Description
Saves any changes made via the UI to
config.json, and values inconfig.jsonoverride any environment variables set.This is achieved with:
WrappedConfig__get__and__set__decorators so that the config can be used as if it was the raw values in combination withAppConfigAppConfigWrappedConfigs so thatapp.state.config.VARtriggers the__get__and__set__decorators onWrappedConfigAddresses: #1022
Changelog Entry
Added
config.jsonfile. Values within this file will override any environment variables you have set.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.