Reorder Vertex class assignment
This commit is contained in:
parent
ec8a801827
commit
4aefcb03a7
1 changed files with 5 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ from langflow.graph.vertex.types import (
|
||||||
ChatVertex,
|
ChatVertex,
|
||||||
FileToolVertex,
|
FileToolVertex,
|
||||||
LLMVertex,
|
LLMVertex,
|
||||||
|
RoutingVertex,
|
||||||
ToolkitVertex,
|
ToolkitVertex,
|
||||||
)
|
)
|
||||||
from langflow.interface.tools.constants import FILE_TOOLS
|
from langflow.interface.tools.constants import FILE_TOOLS
|
||||||
|
|
@ -402,10 +403,12 @@ class Graph:
|
||||||
node_name = node_id.split("-")[0]
|
node_name = node_id.split("-")[0]
|
||||||
if node_name in ["ChatOutput", "ChatInput"]:
|
if node_name in ["ChatOutput", "ChatInput"]:
|
||||||
return ChatVertex
|
return ChatVertex
|
||||||
if node_name in lazy_load_vertex_dict.VERTEX_TYPE_MAP:
|
elif node_name in ["ShouldRunNext"]:
|
||||||
return lazy_load_vertex_dict.VERTEX_TYPE_MAP[node_name]
|
return RoutingVertex
|
||||||
elif node_base_type in lazy_load_vertex_dict.VERTEX_TYPE_MAP:
|
elif node_base_type in lazy_load_vertex_dict.VERTEX_TYPE_MAP:
|
||||||
return lazy_load_vertex_dict.VERTEX_TYPE_MAP[node_base_type]
|
return lazy_load_vertex_dict.VERTEX_TYPE_MAP[node_base_type]
|
||||||
|
elif node_name in lazy_load_vertex_dict.VERTEX_TYPE_MAP:
|
||||||
|
return lazy_load_vertex_dict.VERTEX_TYPE_MAP[node_name]
|
||||||
|
|
||||||
if node_type in FILE_TOOLS:
|
if node_type in FILE_TOOLS:
|
||||||
return FileToolVertex
|
return FileToolVertex
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue