diff --git a/src/backend/langflow/graph/vertex/base.py b/src/backend/langflow/graph/vertex/base.py index 341f6097a..01d182142 100644 --- a/src/backend/langflow/graph/vertex/base.py +++ b/src/backend/langflow/graph/vertex/base.py @@ -14,6 +14,7 @@ from langflow.utils.util import sync_to_async from loguru import logger if TYPE_CHECKING: + from langflow.api.v1.schemas import ResultDict from langflow.graph.edge.base import ContractEdge from langflow.graph.graph.base import Graph @@ -49,6 +50,7 @@ class Vertex: self.parent_is_top_level = False self.layer = None self.should_run = True + self.result: Optional["ResultDict"] = None try: self.is_interface_component = InterfaceComponentTypes(self.vertex_type) except ValueError: @@ -79,6 +81,9 @@ class Vertex: ) return edge_results + def set_result(self, result: "ResultDict") -> None: + self.result = result + def get_built_result(self): # If the Vertex.type is a power component # then we need to return the built object