Add result attribute to Vertex class
This commit is contained in:
parent
0fb0b34423
commit
aadb4c7d87
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue