From 683d0ffcc89d588e0065db569b72df74c3a81559 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 25 Jul 2023 20:54:57 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(types.py):=20prevent=20addin?= =?UTF-8?q?g=20base=20classes=20that=20are=20in=20CLASSES=5FTO=5FREMOVE=20?= =?UTF-8?q?list=20to=20frontend=5Fnode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/types.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/interface/types.py b/src/backend/langflow/interface/types.py index 4f150e6a2..27cdaaa2f 100644 --- a/src/backend/langflow/interface/types.py +++ b/src/backend/langflow/interface/types.py @@ -18,6 +18,7 @@ from langflow.interface.custom.base import custom_component_creator from langflow.interface.custom.custom_component import CustomComponent from langflow.template.field.base import TemplateField +from langflow.template.frontend_node.constants import CLASSES_TO_REMOVE from langflow.template.frontend_node.custom_components import ( CustomComponentFrontendNode, ) @@ -247,7 +248,8 @@ def add_base_classes(frontend_node, return_type): base_classes = get_base_classes(return_type_instance) for base_class in base_classes: - frontend_node.get("base_classes").append(base_class) + if base_class not in CLASSES_TO_REMOVE: + frontend_node.get("base_classes").append(base_class) def build_langchain_template_custom_component(custom_component: CustomComponent):