From c6d8d62ffd9c0aef4c20445688155f0ee22d2379 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 29 Jun 2023 12:56:50 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20chore(types.py):=20add=20OutputP?= =?UTF-8?q?arserVertex=20class=20to=20support=20output=20parsing=20functio?= =?UTF-8?q?nality=20The=20OutputParserVertex=20class=20is=20added=20to=20t?= =?UTF-8?q?he=20types.py=20file.=20This=20class=20extends=20the=20Vertex?= =?UTF-8?q?=20class=20and=20is=20used=20to=20represent=20a=20vertex=20in?= =?UTF-8?q?=20the=20graph=20that=20performs=20output=20parsing.=20It=20tak?= =?UTF-8?q?es=20a=20data=20parameter=20of=20type=20Dict=20in=20its=20const?= =?UTF-8?q?ructor=20and=20calls=20the=20super=20constructor=20with=20the?= =?UTF-8?q?=20data=20and=20a=20base=5Ftype=20of=20"output=5Fparsers".=20Th?= =?UTF-8?q?is=20change=20is=20made=20to=20support=20the=20implementation?= =?UTF-8?q?=20of=20output=20parsing=20functionality=20in=20the=20graph.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/graph/vertex/types.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/langflow/graph/vertex/types.py b/src/backend/langflow/graph/vertex/types.py index 775a2ebd2..af2081217 100644 --- a/src/backend/langflow/graph/vertex/types.py +++ b/src/backend/langflow/graph/vertex/types.py @@ -194,3 +194,8 @@ class PromptVertex(Vertex): self._build() return self._built_object + + +class OutputParserVertex(Vertex): + def __init__(self, data: Dict): + super().__init__(data, base_type="output_parsers")