Skip to content

Commit 1351203

Browse files
committed
new: renamed the flow field to actors in workflow definition
1 parent 405fd72 commit 1351203

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

docs/workflows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Its YAML definition is:
2121
name: "Write a Recipe"
2222
description: "A workflow for writing a recipe."
2323

24-
flow:
24+
actors:
2525
create_list_of_ingredients:
2626
generator: anthropic://claude
2727

@@ -35,7 +35,7 @@ flow:
3535
generator: openai://gpt-4o
3636
```
3737
38-
Each element of the `flow` array is an agent that will be executed in the order specified.
38+
Each element in the `actors` array represents an agent that will be executed sequentially in the specified order.
3939

4040
**create_list_of_ingredients.yml**
4141

examples/recipe-workflow/workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "Write a Recipe"
22
description: "A workflow for writing a recipe."
33

4-
flow:
4+
actors:
55
create_list_of_ingredients:
66
generator: openai/gpt-4o-mini
77
#anthropic/claude-3-5-sonnet

nerve/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Actor(BaseModel):
122122

123123
name: str
124124
description: str
125-
flow: dict[str, Actor]
125+
actors: dict[str, Actor]
126126

127127
@staticmethod
128128
def is_workflow(input_path: pathlib.Path) -> bool:

nerve/runtime/flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def from_path(
7676
root_path = input_path if input_path.is_dir() else input_path.parent
7777

7878
actors = []
79-
for actor_name, actor in workflow.flow.items():
79+
for actor_name, actor in workflow.actors.items():
8080
# determine actor task file
8181
task_file_path = (root_path / actor_name).with_suffix(".yml")
8282
if not task_file_path.exists():

0 commit comments

Comments
 (0)