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
daa989b7
Commit
daa989b7
authored
Feb 19, 2024
by
Timothy J. Baek
Browse files
feat: validate type
parent
d58de061
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
backend/config.py
backend/config.py
+3
-2
No files found.
backend/config.py
View file @
daa989b7
...
@@ -36,7 +36,6 @@ try:
...
@@ -36,7 +36,6 @@ try:
except
:
except
:
CONFIG_DATA
=
{}
CONFIG_DATA
=
{}
print
(
CONFIG_DATA
)
####################################
####################################
# File Upload DIR
# File Upload DIR
####################################
####################################
...
@@ -93,7 +92,9 @@ DEFAULT_MODELS = os.environ.get("DEFAULT_MODELS", None)
...
@@ -93,7 +92,9 @@ DEFAULT_MODELS = os.environ.get("DEFAULT_MODELS", None)
DEFAULT_PROMPT_SUGGESTIONS
=
(
DEFAULT_PROMPT_SUGGESTIONS
=
(
CONFIG_DATA
[
"ui"
][
"prompt_suggestions"
]
CONFIG_DATA
[
"ui"
][
"prompt_suggestions"
]
if
"ui"
in
CONFIG_DATA
and
"prompt_suggestions"
in
CONFIG_DATA
[
"ui"
]
if
"ui"
in
CONFIG_DATA
and
"prompt_suggestions"
in
CONFIG_DATA
[
"ui"
]
and
type
(
CONFIG_DATA
[
"ui"
][
"prompt_suggestions"
])
is
list
else
[
else
[
{
{
"title"
:
[
"Help me study"
,
"vocabulary for a college entrance exam"
],
"title"
:
[
"Help me study"
,
"vocabulary for a college entrance exam"
],
...
...
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