Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rayrayraykk authored and rabzhang committed Sep 3, 2024
1 parent 3ca748e commit 4a85818
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/agentscope/web/workstation/workflow_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,23 +245,16 @@ 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.
"""
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",
Expand All @@ -280,6 +273,7 @@ class DictDialogAgentNode(WorkflowNode):

node_type = WorkflowNodeType.AGENT

<<<<<<< HEAD
def __init__(
self,
node_id: str,
Expand All @@ -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.
Expand All @@ -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",
Expand Down

0 comments on commit 4a85818

Please sign in to comment.