File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -694,13 +694,15 @@ def run(
694
694
max_turns : int = None ,
695
695
** task_kwargs ,
696
696
):
697
- return controlflow . run (
698
- objective ,
697
+ task = Task (
698
+ objective = objective ,
699
699
* task_args ,
700
+ ** task_kwargs ,
701
+ )
702
+ return task .run (
700
703
turn_strategy = turn_strategy ,
701
704
max_calls_per_turn = max_calls_per_turn ,
702
705
max_turns = max_turns ,
703
- ** task_kwargs ,
704
706
)
705
707
706
708
@@ -712,11 +714,13 @@ async def run_async(
712
714
max_turns : int = None ,
713
715
** task_kwargs ,
714
716
):
715
- return await controlflow . run_async (
716
- objective ,
717
+ task = Task (
718
+ objective = objective ,
717
719
* task_args ,
720
+ ** task_kwargs ,
721
+ )
722
+ return await task .run_async (
718
723
turn_strategy = turn_strategy ,
719
724
max_calls_per_turn = max_calls_per_turn ,
720
725
max_turns = max_turns ,
721
- ** task_kwargs ,
722
726
)
You can’t perform that action at this time.
0 commit comments