From daa989b7dc7fdc956a7b2861a85e03f187a1cf0a Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 19 Feb 2024 19:09:09 -0800 Subject: [PATCH] feat: validate type --- backend/config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/config.py b/backend/config.py index fff5683f..8167d4f1 100644 --- a/backend/config.py +++ b/backend/config.py @@ -36,7 +36,6 @@ try: except: CONFIG_DATA = {} -print(CONFIG_DATA) #################################### # File Upload DIR #################################### @@ -93,7 +92,9 @@ DEFAULT_MODELS = os.environ.get("DEFAULT_MODELS", None) DEFAULT_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 [ { "title": ["Help me study", "vocabulary for a college entrance exam"],