diff --git a/backend/chainlit/config.py b/backend/chainlit/config.py index 9a1c4f0e2a..28550aaeff 100644 --- a/backend/chainlit/config.py +++ b/backend/chainlit/config.py @@ -269,9 +269,9 @@ class CodeSettings: password_auth_callback: Optional[ Callable[[str, str], Awaitable[Optional["User"]]] ] = None - header_auth_callback: Optional[ - Callable[[Headers], Awaitable[Optional["User"]]] - ] = None + header_auth_callback: Optional[Callable[[Headers], Awaitable[Optional["User"]]]] = ( + None + ) oauth_callback: Optional[ Callable[[str, str, Dict[str, str], "User"], Awaitable[Optional["User"]]] ] = None @@ -290,9 +290,9 @@ class CodeSettings: set_chat_profiles: Optional[ Callable[[Optional["User"]], Awaitable[List["ChatProfile"]]] ] = None - set_starters: Optional[ - Callable[[Optional["User"]], Awaitable[List["Starter"]]] - ] = None + set_starters: Optional[Callable[[Optional["User"]], Awaitable[List["Starter"]]]] = ( + None + ) @dataclass() @@ -445,6 +445,8 @@ def load_settings(): ui_settings = toml_dict.get("UI", {}) meta = toml_dict.get("meta") + print(toml_dict) + if not meta or meta.get("generated_by") <= "0.3.0": raise ValueError( f"Your config file '{config_file}' is outdated. Please delete it and restart the app to regenerate it."