Skip to content

Commit

Permalink
Fix change to run fns
Browse files Browse the repository at this point in the history
  • Loading branch information
jlowin committed Sep 3, 2024
1 parent b835fd6 commit e458363
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/controlflow/tasks/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,13 +694,15 @@ def run(
max_turns: int = None,
**task_kwargs,
):
return controlflow.run(
objective,
task = Task(
objective=objective,
*task_args,
**task_kwargs,
)
return task.run(
turn_strategy=turn_strategy,
max_calls_per_turn=max_calls_per_turn,
max_turns=max_turns,
**task_kwargs,
)


Expand All @@ -712,11 +714,13 @@ async def run_async(
max_turns: int = None,
**task_kwargs,
):
return await controlflow.run_async(
objective,
task = Task(
objective=objective,
*task_args,
**task_kwargs,
)
return await task.run_async(
turn_strategy=turn_strategy,
max_calls_per_turn=max_calls_per_turn,
max_turns=max_turns,
**task_kwargs,
)

0 comments on commit e458363

Please sign in to comment.