🐛 fix(types.py): change base_type from "tools" to "custom_components" for CustomComponentVertex to improve categorization

🔧 refactor(types.py): modify _built_object_repr method in CustomComponentVertex to handle custom representation if available in artifacts
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-21 09:27:04 -03:00
commit e835d4a0e9

View file

@ -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()