diff --git a/src/backend/langflow/interface/custom/custom_component.py b/src/backend/langflow/interface/custom/custom_component.py index ccc0b08b2..42b68ed40 100644 --- a/src/backend/langflow/interface/custom/custom_component.py +++ b/src/backend/langflow/interface/custom/custom_component.py @@ -1,7 +1,7 @@ from typing import Any, Callable, List, Optional, Union from uuid import UUID from fastapi import HTTPException -from langflow.interface.custom.constants import CUSTOM_COMPONENT_SUPPORTED_TYPES +from langflow.field_typing.constants import CUSTOM_COMPONENT_SUPPORTED_TYPES from langflow.interface.custom.component import Component from langflow.interface.custom.directory_reader import DirectoryReader from langflow.services.getters import get_db_service @@ -108,6 +108,7 @@ class CustomComponent(Component, extra=Extra.allow): ), }, ) + # TODO arg type should be Data if it is None return args @property diff --git a/src/backend/langflow/template/frontend_node/custom_components.py b/src/backend/langflow/template/frontend_node/custom_components.py index 4f36a1c9f..e239775bc 100644 --- a/src/backend/langflow/template/frontend_node/custom_components.py +++ b/src/backend/langflow/template/frontend_node/custom_components.py @@ -2,6 +2,7 @@ from langflow.template.field.base import TemplateField from langflow.template.frontend_node.base import FrontendNode from langflow.template.template.base import Template from langflow.interface.custom.constants import DEFAULT_CUSTOM_COMPONENT_CODE +from typing import Optional class CustomComponentFrontendNode(FrontendNode): @@ -24,7 +25,7 @@ class CustomComponentFrontendNode(FrontendNode): ) ], ) - description: str = "Create any custom component you want!" + description: Optional[str] = None base_classes: list[str] = [] def to_dict(self):