From e3bde8816ab645bf26fbbf100920b0b3e594847b Mon Sep 17 00:00:00 2001 From: Dmitry Paramonov Date: Fri, 23 Aug 2024 17:53:09 +0300 Subject: [PATCH] chore: Rename accumulator value --- agents-api/agents_api/workflows/task_execution.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agents-api/agents_api/workflows/task_execution.py b/agents-api/agents_api/workflows/task_execution.py index a61996e5f..7e64e3437 100644 --- a/agents-api/agents_api/workflows/task_execution.py +++ b/agents-api/agents_api/workflows/task_execution.py @@ -267,7 +267,7 @@ async def transition(**kwargs) -> None: map=map_defn, reduce=reduce, initial=initial ), StepOutcome(output=items): initial = initial or [] - reduce = reduce or "initial + [_]" + reduce = reduce or "results + [_]" for i, item in enumerate(items): workflow_name = f"`{context.cursor.workflow}`[{context.cursor.step}].mapreduce[{i}]" @@ -304,7 +304,7 @@ async def transition(**kwargs) -> None: task_steps.base_evaluate, args=[ reduce, - {"initial": initial, "_": output}, + {"results": initial, "_": output}, ], schedule_to_close_timeout=timedelta(seconds=2), )