Skip to content

Commit

Permalink
update operator name in docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-x-c committed Jan 16, 2024
1 parent 469614d commit c455988
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/agentscope/pipelines/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ def ifelsepipeline(
condition_func (`Callable`):
A function that determines whether to exeucte `if_body_operator`
or `else_body_operator` based on x.
if_body_operator (`_Operator`):
if_body_operator (`Operator`):
An operator executed when `condition_func` returns True.
else_body_operator (`_Operator`, defaults to `placeholder`):
else_body_operator (`Operator`, defaults to `placeholder`):
An operator executed when condition_func returns False,
does nothing and just return the input by default.
Expand Down Expand Up @@ -84,10 +84,10 @@ def switchpipeline(
condition_func (`Callable[[dict], Any]`):
A function that determines which case_operator to execute based
on the input x.
case_operators (`Mapping[Any, _Operator]`):
case_operators (`Mapping[Any, Operator]`):
A dictionary containing multiple operators and their
corresponding trigger conditions.
default_operator (`_Operator`, defaults to `placeholder`):
default_operator (`Operator`, defaults to `placeholder`):
An operator that is executed when the actual condition do not
meet any of the case_operators, does nothing and just return the
input by default.
Expand All @@ -113,7 +113,7 @@ def forlooppipeline(
Args:
x (`dict`):
The input dictionary.
loop_body_operator (`_Operator`):
loop_body_operator (`Operator`):
An operator executed as the body of the loop.
max_loop (`int`):
maximum number of loop executions.
Expand Down Expand Up @@ -143,7 +143,7 @@ def whilelooppipeline(
Args:
x (`dict`): The input dictionary.
loop_body_operator (`_Operator`): An operator executed as the body of
loop_body_operator (`Operator`): An operator executed as the body of
the loop.
condition_func (`Callable[[int, dict], bool]`, optional): A function
that determines whether to continue executing the loop body based
Expand Down
12 changes: 6 additions & 6 deletions src/agentscope/pipelines/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(
condition_func (`Callable[[dict], bool]`):
A function that determines whether to execute
if_body_operator or else_body_operator based on the input x.
if_body_operator (`_Operator`):
if_body_operator (`Operator`):
An operator executed when condition_func returns True.
else_body_operator (`_Optional`):
An operator executed when condition_func returns False,
Expand Down Expand Up @@ -105,10 +105,10 @@ def __init__(
condition_func (`Callable[[dict], Any]`):
A function that determines which case_operator to execute
based on the input x.
case_operators (`dict[Any, _Operator]`):
case_operators (`dict[Any, Operator]`):
A dictionary containing multiple operators and their
corresponding trigger conditions.
default_operator (`_Operator`, defaults to `placeholder`):
default_operator (`Operator`, defaults to `placeholder`):
An operator that is executed when the actual condition do
not meet any of the case_operators, does nothing and just
return the input by default.
Expand Down Expand Up @@ -153,7 +153,7 @@ def __init__(
r"""Initialize a ForLoopPipeline.
Args:
loop_body_operator (`_Operator`):
loop_body_operator (`Operator`):
An operator executed as the body of the loop.
max_loop (`int`):
Maximum number of loop executions.
Expand Down Expand Up @@ -195,7 +195,7 @@ def __init__(
"""Initialize a WhileLoopPipeline.
Args:
loop_body_operator (`_Operator`):
loop_body_operator (`Operator`):
An operator executed as the body of the loop.
condition_func (`Callable[[int, dict], bool]`, defaults to
`lambda _, __: False`):
Expand Down Expand Up @@ -229,7 +229,7 @@ def __init__(self, operators: Sequence[Operator]) -> None:
r"""Initialize a Sequential pipeline.
Args:
operators (`Sequence[_Operator]`):
operators (`Sequence[Operator]`):
A Sequence of operators to be executed sequentially.
"""
self.operators = operators
Expand Down

0 comments on commit c455988

Please sign in to comment.