Update Vertex params with code type and add a my_conversation method to the MyPythonClass. Modify the instantiate_tool function to properly handle the CustomComponent node type. Add a dynamic field to the FrontendNode class.

This commit is contained in:
gustavoschaedler 2023-07-05 00:46:51 +01:00
commit 92b747b6da
6 changed files with 42 additions and 29 deletions

View file

@ -178,9 +178,8 @@ def instantiate_tool(node_type, class_object, params):
params["func"] = get_function(params.get("code"))
return class_object(**params)
elif node_type == "CustomComponent":
return get_function_custom(params.get("code"))
# params["func"] = get_function_custom(params.get("code"))
# return class_object(**params)
params["func"] = get_function_custom(params.get("code"))
return class_object(**params)
# For backward compatibility
elif node_type == "PythonFunction":
function_string = params["code"]