diff --git a/backend/chatsky_ui/schemas/front_graph_components/interface.py b/backend/chatsky_ui/schemas/front_graph_components/interface.py index a11a7b57..26ae339d 100644 --- a/backend/chatsky_ui/schemas/front_graph_components/interface.py +++ b/backend/chatsky_ui/schemas/front_graph_components/interface.py @@ -28,6 +28,7 @@ def check_one_not_none(cls, values): @model_validator(mode="after") def check_telegram_token(cls, values): + load_dotenv(os.path.join(settings.work_directory, ".env")) tg_bot_token = os.getenv("TG_BOT_TOKEN") if values.telegram is not None and not tg_bot_token: raise ValueError("Telegram token must be provided.")