Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
skull8888888 committed Dec 2, 2024
1 parent 9016718 commit b8770ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b8770ee

Please sign in to comment.