diff --git a/README.md b/README.md index efeae22..3c59f70 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ result = flow.run("greet") # Returns {"greet": "Hello World!"} ```python # Tasks can trigger other tasks def task1(context: Context) -> TaskOutput: - return TaskOutput(output="result1", next=[NextTask("task2")]) + return TaskOutput(output="result1", [NextTask("task2")]) def task2(context: Context) -> TaskOutput: # Access results from previous tasks @@ -81,7 +81,7 @@ flow.run("task1") # Returns {"task2": "result2"} ```python def starter(context: Context) -> TaskOutput: # Launch multiple tasks in parallel - return TaskOutput(output="started", next=[NextTask("slow_task1"), NextTask("slow_task2")]) + return TaskOutput(output="started", [NextTask("slow_task1"), NextTask("slow_task2")]) def slow_task1(context: Context) -> TaskOutput: time.sleep(1) @@ -129,7 +129,7 @@ def conditional_task(context: Context) -> TaskOutput: return TaskOutput(output="done") context.set("count", count + 1) - return TaskOutput(output=f"iteration_{count}", next=[NextTask("conditional_task")]) + return TaskOutput(output=f"iteration_{count}", [NextTask("conditional_task")]) # Task will loop 3 times before finishing flow.add_task("conditional_task", conditional_task) diff --git a/pyproject.toml b/pyproject.toml index e9239fe..a48879f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "lmnr-flow" -version = "0.1.1" +version = "0.1.2" description = "Lightweight task engine for building AI agents" readme = "README.md" requires-python = ">=3.10"