Skip to content

Commit

Permalink
Remove multi input check and support multi input for agent node (mode…
Browse files Browse the repository at this point in the history
  • Loading branch information
qbc2016 authored Sep 11, 2024
1 parent d3186c4 commit 3e709eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
18 changes: 0 additions & 18 deletions src/agentscope/studio/static/js/workstation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1441,24 +1441,6 @@ function checkConditions() {
console.log("node", node);
console.log("node.inputs", node.inputs);

if (node.inputs) {
for (let inputKey in node.inputs) {
if (node.class !== "ImageComposition" &&
node.class !== "VideoComposition" &&
node.inputs[inputKey].connections &&
node.inputs[inputKey].connections.length > 1) {
Swal.fire({
title: 'Invalid Connections',
text:
`${node.name} has more than one connection in inputs.`,
icon: 'error',
confirmButtonText: 'Ok'
});
return false;
}
}
}

let nodeElement = document.getElementById('node-' + nodeId);
const requiredInputs = nodeElement.querySelectorAll('input[data-required="true"]');

Expand Down
6 changes: 3 additions & 3 deletions src/agentscope/web/workstation/workflow_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def compile(self) -> dict:
"inits": f"{self.var_name} = DialogAgent("
f"{kwarg_converter(self.opt_kwargs)})",
"execs": f"{DEFAULT_FLOW_VAR} = {self.var_name}"
f"({DEFAULT_FLOW_VAR})",
f"([{DEFAULT_FLOW_VAR}])",
}


Expand Down Expand Up @@ -343,7 +343,7 @@ def compile(self) -> dict:
"inits": f"{self.var_name} = DictDialogAgent("
f"{kwarg_converter(self.opt_kwargs)})",
"execs": f"{DEFAULT_FLOW_VAR} = {self.var_name}"
f"({DEFAULT_FLOW_VAR})",
f"([{DEFAULT_FLOW_VAR}])",
}


Expand Down Expand Up @@ -397,7 +397,7 @@ def compile(self) -> dict:
f"({kwarg_converter(self.opt_kwargs)}, service_toolkit"
f"={self.var_name}_service_toolkit)",
"execs": f"{DEFAULT_FLOW_VAR} = {self.var_name}"
f"({DEFAULT_FLOW_VAR})",
f"([{DEFAULT_FLOW_VAR}])",
}


Expand Down

0 comments on commit 3e709eb

Please sign in to comment.