add warning message when no inputs/outputs founded

This commit is contained in:
wl-zhao
2024-10-28 15:13:01 +08:00
parent a9d07ba4d3
commit 73bfa4e7b0
+4 -3
View File
@@ -158,13 +158,14 @@ async def shellagent_export(request):
# for fname, dict_to_save in fname_mapping.items():
# with open(os.path.join(save_root, fname), "w") as f:
# json.dump(dict_to_save, f, indent=2)
warning_message = ""
if dependency_results.get("black_list_nodes", []):
warning_message = "The following nodes cannot be deployed to myshell:\n"
for item in dependency_results["black_list_nodes"]:
warning_message += f" {item['name']}: {item['reason']}\n"
else:
warning_message = ""
if len(schemas["inputs"]) + len(schemas["outputs"]) == 0:
warning_message += f"The workflow contains neither inputs nor outputs!\n"
return_dict = {
"success": True,