-
Notifications
You must be signed in to change notification settings - Fork 959
Open
Labels
Description
Use case: custom Workflow executor needs to report output information. Two approaches to submit output were tested:
event = WorkflowOutputEvent(source_executor_id=”executor_id”, data=response.text)
await ctx.add_event(event)
and
await ctx.yield_output(response.text[:50]+ "...")
Event information is retrieved by next code:
events = await workflow.run(user_message)
print(f"{'=' * 60}\nWorkflow Events:")
for event in events:
print(f"{type(event).__name__}:
{getattr(event, 'executor_id', None)}:
{str(getattr(event, 'data', None))[:80]}...")
Printed result does not show executor name as seen below
WorkflowOutputEvent:None:
Other events like ExecutorInvokedEvent and ExecutorCompletedEvent show correct executor name.
Additionally, it would be nice to have executor information in events.get_outputs()
Please advise how to get executor information in output events.
Thank you
YK