Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
87344adf
Commit
87344adf
authored
Mar 19, 2024
by
Timothy J. Baek
Browse files
refac
parent
c6e14ce3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
backend/config.py
backend/config.py
+4
-5
No files found.
backend/config.py
View file @
87344adf
...
@@ -289,12 +289,11 @@ DEFAULT_PROMPT_SUGGESTIONS = (
...
@@ -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'
):
)
raise
ValueError
(
ERROR_MESSAGES
.
INCORRECT_FORMAT
(
" (e.g., True/False)."
))
USER_PERMISSIONS
=
{
"chat"
:
{
"deletion"
:
USER_PERMISSIONS_CHAT_DELETION
==
'True'
}}
USER_PERMISSIONS
=
{
"chat"
:
{
"deletion"
:
USER_PERMISSIONS_CHAT_DELETION
}}
MODEL_FILTER_ENABLED
=
os
.
environ
.
get
(
"MODEL_FILTER_ENABLED"
,
False
)
MODEL_FILTER_ENABLED
=
os
.
environ
.
get
(
"MODEL_FILTER_ENABLED"
,
False
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment