forked from open-webui/open-webui
refac
This commit is contained in:
parent
c6e14ce327
commit
87344adf29
1 changed files with 4 additions and 5 deletions
|
@ -289,12 +289,11 @@ DEFAULT_PROMPT_SUGGESTIONS = (
|
||||||
|
|
||||||
DEFAULT_USER_ROLE = os.getenv("DEFAULT_USER_ROLE", "pending")
|
DEFAULT_USER_ROLE = os.getenv("DEFAULT_USER_ROLE", "pending")
|
||||||
|
|
||||||
USER_PERMISSIONS_CHAT_DELETION = os.getenv('USER_PERMISSIONS_CHAT_DELETION', 'True')
|
USER_PERMISSIONS_CHAT_DELETION = (
|
||||||
|
os.environ.get("USER_PERMISSIONS_CHAT_DELETION", "True").lower() == "true"
|
||||||
|
)
|
||||||
|
|
||||||
if USER_PERMISSIONS_CHAT_DELETION not in ('True', 'False'):
|
USER_PERMISSIONS = {"chat": {"deletion": USER_PERMISSIONS_CHAT_DELETION}}
|
||||||
raise ValueError(ERROR_MESSAGES.INCORRECT_FORMAT(" (e.g., True/False)."))
|
|
||||||
|
|
||||||
USER_PERMISSIONS = {"chat": {"deletion": USER_PERMISSIONS_CHAT_DELETION == 'True'}}
|
|
||||||
|
|
||||||
|
|
||||||
MODEL_FILTER_ENABLED = os.environ.get("MODEL_FILTER_ENABLED", False)
|
MODEL_FILTER_ENABLED = os.environ.get("MODEL_FILTER_ENABLED", False)
|
||||||
|
|
Loading…
Reference in a new issue