File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
ai_data_science_team/multiagents Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -298,11 +298,22 @@ def get_workflow_summary(self, markdown=False):
298298 If True, returns the summary as a Markdown-formatted string.
299299 """
300300 if self .response and self .get_response ()['messages' ]:
301+
302+ agents = [self .get_response ()['messages' ][i ].role for i in range (len (self .get_response ()['messages' ]))]
303+
304+ agent_labels = []
305+ for i in range (len (agents )):
306+ agent_labels .append (f"- **Agent { i + 1 } :** { agents [i ]} " )
307+
308+ # Construct header
309+ header = f"# SQL Data Analyst Workflow Summary Report\n \n This agentic workflow contains { len (agents )} agents:\n \n " + "\n " .join (agent_labels )
310+
301311 reports = []
302312 for msg in self .get_response ()['messages' ]:
303313 reports .append (get_generic_summary (json .loads (msg .content )))
314+
304315 if markdown :
305- return Markdown ("\n \n " .join (reports ))
316+ return Markdown (header + "\n \n " .join (reports ))
306317 return "\n \n " .join (reports )
307318
308319
You can’t perform that action at this time.
0 commit comments