From e7532ff9a3c629408df3d1312943c4056c04614c Mon Sep 17 00:00:00 2001 From: Hamada Salhab Date: Thu, 26 Sep 2024 17:16:44 +0300 Subject: [PATCH] fix(agents-api): Fix wait for input step (#522) > [!IMPORTANT] > Removes unnecessary transition call in `WaitForInputStep` case in `TaskExecutionWorkflow.run()` and updates tests accordingly. > > - **Behavior**: > - Removes `await transition(context, type="wait", output=output)` from `WaitForInputStep` case in `run()` in `__init__.py`. > - **Tests**: > - Updates `test_execution_workflow.py` to ensure workflow behaves correctly without the removed transition call. > > This description was created by [Ellipsis](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral) for 6600cee7ef0ea8b27e2026e2ea8d6402fe996a26. It will automatically update as commits are pushed. --- agents-api/agents_api/workflows/task_execution/__init__.py | 2 -- agents-api/tests/test_execution_workflow.py | 1 - 2 files changed, 3 deletions(-) diff --git a/agents-api/agents_api/workflows/task_execution/__init__.py b/agents-api/agents_api/workflows/task_execution/__init__.py index aab0979a8..2ca7e6ade 100644 --- a/agents-api/agents_api/workflows/task_execution/__init__.py +++ b/agents-api/agents_api/workflows/task_execution/__init__.py @@ -381,8 +381,6 @@ async def run( case WaitForInputStep(), StepOutcome(output=output): workflow.logger.info("Wait for input step: Waiting for external input") - await transition(context, type="wait", output=output) - result = await workflow.execute_activity( task_steps.raise_complete_async, args=[context, output], diff --git a/agents-api/tests/test_execution_workflow.py b/agents-api/tests/test_execution_workflow.py index 3ff1c989e..b6394f1bc 100644 --- a/agents-api/tests/test_execution_workflow.py +++ b/agents-api/tests/test_execution_workflow.py @@ -1085,4 +1085,3 @@ async def _( mock_run_task_execution_workflow.assert_called_once() await handle.result() -