From 305b18e836f20e873ba42186e98468fa8be89f2b Mon Sep 17 00:00:00 2001 From: Rachel Hu Date: Wed, 13 Sep 2023 01:14:59 -0700 Subject: [PATCH] update Dropdown component to ad-hoc import --- pykoi/application.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pykoi/application.py b/pykoi/application.py index 13fb29c..32072ce 100644 --- a/pykoi/application.py +++ b/pykoi/application.py @@ -14,7 +14,6 @@ from pydantic import BaseModel from pyngrok import ngrok from starlette.middleware.cors import CORSMiddleware -from pykoi.component.base import Dropdown from pykoi.interactives.chatbot import Chatbot from pykoi.telemetry.telemetry import Telemetry from pykoi.telemetry.events import AppStartEvent, AppStopEvent @@ -157,6 +156,9 @@ def add_component(self, component: Any): Args: component (Any): The component to be added. """ + # TODO (Jojo): remove component Dropdown check + from pykoi.component.base import Dropdown + if component.data_source: self.data_sources[component.id] = component.data_source # set data_endpoint if it's a Dropdown component