diff --git a/src/backend/langflow/interface/custom/custom_component.py b/src/backend/langflow/interface/custom/custom_component.py index 4ff58fd27..c2a7c4c74 100644 --- a/src/backend/langflow/interface/custom/custom_component.py +++ b/src/backend/langflow/interface/custom/custom_component.py @@ -165,6 +165,9 @@ class CustomComponent(Component): return next(iter(classes), "") @property + def template_config(self): + return self.build_template_config() + def build_template_config(self): if not self.code: return {} diff --git a/tests/test_custom_component.py b/tests/test_custom_component.py index 007374763..35eaba00e 100644 --- a/tests/test_custom_component.py +++ b/tests/test_custom_component.py @@ -120,7 +120,7 @@ def test_custom_component_build_template_config(): Test the build_template_config property of the CustomComponent class. """ custom_component = CustomComponent(code=code_default, function_entrypoint_name="build") - config = custom_component.build_template_config + config = custom_component.template_config assert isinstance(config, dict)