diff --git a/src/backend/base/langflow/custom/custom_component/custom_component.py b/src/backend/base/langflow/custom/custom_component/custom_component.py index aeac9cae6..75cbabfe8 100644 --- a/src/backend/base/langflow/custom/custom_component/custom_component.py +++ b/src/backend/base/langflow/custom/custom_component/custom_component.py @@ -7,6 +7,7 @@ import yaml from cachetools import TTLCache, cachedmethod from langchain_core.documents import Document from pydantic import BaseModel + from langflow.custom.code_parser.utils import ( extract_inner_type_from_generic_alias, extract_union_types_from_generic_alias, @@ -17,6 +18,7 @@ from langflow.schema import Record from langflow.schema.dotdict import dotdict from langflow.services.deps import get_storage_service, get_variable_service, session_scope from langflow.services.storage.service import StorageService +from langflow.template.field.base import Input, Output from langflow.utils import validate if TYPE_CHECKING: @@ -78,6 +80,9 @@ class CustomComponent(Component): """The status of the component. This is displayed on the frontend. Defaults to None.""" _flows_records: Optional[List[Record]] = None + inputs: Optional[List[Input]] = None + outputs: Optional[List[Output]] = None + def update_state(self, name: str, value: Any): if not self.vertex: raise ValueError("Vertex is not set") @@ -464,3 +469,4 @@ class CustomComponent(Component): Any: The result of the build process. """ raise NotImplementedError + raise NotImplementedError