From e835d4a0e9582570f9564ae3787e2f282aff3e7e Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 21 Jul 2023 09:27:04 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(types.py):=20change=20base?= =?UTF-8?q?=5Ftype=20from=20"tools"=20to=20"custom=5Fcomponents"=20for=20C?= =?UTF-8?q?ustomComponentVertex=20to=20improve=20categorization=20?= =?UTF-8?q?=F0=9F=94=A7=20refactor(types.py):=20modify=20=5Fbuilt=5Fobject?= =?UTF-8?q?=5Frepr=20method=20in=20CustomComponentVertex=20to=20handle=20c?= =?UTF-8?q?ustom=20representation=20if=20available=20in=20artifacts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/graph/vertex/types.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/graph/vertex/types.py b/src/backend/langflow/graph/vertex/types.py index 707ecc67f..5aee7b14c 100644 --- a/src/backend/langflow/graph/vertex/types.py +++ b/src/backend/langflow/graph/vertex/types.py @@ -243,4 +243,8 @@ class OutputParserVertex(Vertex): class CustomComponentVertex(Vertex): def __init__(self, data: Dict): - super().__init__(data, base_type="tools") + super().__init__(data, base_type="custom_components") + + def _built_object_repr(self): + if self.artifacts and "repr" in self.artifacts: + return self.artifacts["repr"] or super()._built_object_repr()