forked from open-webui/open-webui
feat: validate type
This commit is contained in:
parent
d58de061fa
commit
daa989b7dc
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||||
|
|
||||||
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"],
|
||||||
|
|
Loading…
Reference in a new issue