fix: vertex_type now comes directly from template.type_name
This commit is contained in:
parent
bcba8e0931
commit
259b66bb00
2 changed files with 5 additions and 5 deletions
|
|
@ -48,9 +48,10 @@ class Vertex:
|
||||||
]
|
]
|
||||||
|
|
||||||
template_dict = self.data["node"]["template"]
|
template_dict = self.data["node"]["template"]
|
||||||
self.vertex_type = (
|
# self.vertex_type = (
|
||||||
self.data["type"] if "Tool" not in self.output else template_dict["_type"]
|
# self.data["type"] if "Tool" not in self.output else template_dict["_type"]
|
||||||
)
|
# )
|
||||||
|
self.vertex_type = template_dict["_type"]
|
||||||
if self.base_type is None:
|
if self.base_type is None:
|
||||||
for base_type, value in ALL_TYPES_DICT.items():
|
for base_type, value in ALL_TYPES_DICT.items():
|
||||||
if self.vertex_type in value:
|
if self.vertex_type in value:
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,7 @@ def instantiate_class(node_type: str, base_type: str, params: Dict) -> Any:
|
||||||
params = convert_params_to_sets(params)
|
params = convert_params_to_sets(params)
|
||||||
params = convert_kwargs(params)
|
params = convert_kwargs(params)
|
||||||
if node_type in CUSTOM_AGENTS:
|
if node_type in CUSTOM_AGENTS:
|
||||||
custom_agent = CUSTOM_AGENTS.get(node_type)
|
if custom_agent := CUSTOM_AGENTS.get(node_type):
|
||||||
if custom_agent:
|
|
||||||
return custom_agent.initialize(**params)
|
return custom_agent.initialize(**params)
|
||||||
|
|
||||||
class_object = import_by_type(_type=base_type, name=node_type)
|
class_object = import_by_type(_type=base_type, name=node_type)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue