Skip to content

Commit 86de80a

Browse files
author
Davidson Gomes
committed
refactor(workflow_agent): iterate over AsyncGenerator in workflow execution
1 parent 2bac2b3 commit 86de80a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/services/workflow_agent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,9 @@ async def _run_async_impl(
788788
print("\n🚀 Starting workflow execution:")
789789
print(f"Initial content: {user_message[:100]}...")
790790

791-
await self._execute_workflow(ctx, graph, initial_state)
791+
# Iterar sobre o AsyncGenerator em vez de usar await
792+
async for event in self._execute_workflow(ctx, graph, initial_state):
793+
yield event
792794

793795
except Exception as e:
794796
yield await self._handle_workflow_error(e)

0 commit comments

Comments
 (0)