refactor(workflow_agent): iterate over AsyncGenerator in workflow execution
This commit is contained in:
parent
2bac2b3824
commit
86de80a998
@ -788,7 +788,9 @@ class WorkflowAgent(BaseAgent):
|
||||
print("\n🚀 Starting workflow execution:")
|
||||
print(f"Initial content: {user_message[:100]}...")
|
||||
|
||||
await self._execute_workflow(ctx, graph, initial_state)
|
||||
# Iterar sobre o AsyncGenerator em vez de usar await
|
||||
async for event in self._execute_workflow(ctx, graph, initial_state):
|
||||
yield event
|
||||
|
||||
except Exception as e:
|
||||
yield await self._handle_workflow_error(e)
|
||||
|
Loading…
Reference in New Issue
Block a user