diff --git a/src/agentscope/web/workstation/workflow_node.py b/src/agentscope/web/workstation/workflow_node.py index 2f0251372..4b0b5b6cb 100644 --- a/src/agentscope/web/workstation/workflow_node.py +++ b/src/agentscope/web/workstation/workflow_node.py @@ -245,16 +245,6 @@ class TextToImageAgentNode(WorkflowNode): node_type = WorkflowNodeType.AGENT - def __init__( - self, - node_id: str, - opt_kwargs: dict, - source_kwargs: dict, - dep_opts: list, - ) -> None: - super().__init__(node_id, opt_kwargs, source_kwargs, dep_opts) - self.pipeline = TextToImageAgent(**self.opt_kwargs) - def _execute_init(self) -> None: """ Init before running. @@ -262,6 +252,9 @@ def _execute_init(self) -> None: super()._execute_init() self.pipeline = TextToImageAgent(**self.opt_kwargs) + def _execute(self, x: dict = None) -> dict: + return self.pipeline(x) + def compile(self) -> dict: return { "imports": "from agentscope.agents import TextToImageAgent", @@ -280,6 +273,7 @@ class DictDialogAgentNode(WorkflowNode): node_type = WorkflowNodeType.AGENT +<<<<<<< HEAD def __init__( self, node_id: str, @@ -294,6 +288,8 @@ def __init__( def __call__(self, x: dict = None) -> dict: return self.pipeline(x) ======= +======= +>>>>>>> df3d38c9 (fix) def _execute_init(self) -> None: """ Init before running. @@ -302,6 +298,9 @@ def _execute_init(self) -> None: self.pipeline = DictDialogAgent(**self.opt_kwargs) >>>>>>> ec7dc43b (fix) + def _execute(self, x: dict = None) -> dict: + return self.pipeline(x) + def compile(self) -> dict: return { "imports": "from agentscope.agents import DictDialogAgent",