From fc06897b4e40fd03631fe4865818d44b729e6a35 Mon Sep 17 00:00:00 2001 From: Pavan Kumar <66913595+ascender1729@users.noreply.github.com> Date: Sat, 17 May 2025 22:16:48 +0000 Subject: [PATCH] feat: add robust XML output support throughout the agentic framework (#841) --- swarms/structs/output_types.py | 2 +- swarms/structs/swarm_router.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/swarms/structs/output_types.py b/swarms/structs/output_types.py index 5deab2cd..ca1376a6 100644 --- a/swarms/structs/output_types.py +++ b/swarms/structs/output_types.py @@ -3,4 +3,4 @@ from swarms.utils.history_output_formatter import ( ) # Use the OutputType for type annotations -output_type: OutputType +output_type: OutputType # OutputType now includes 'xml' diff --git a/swarms/structs/swarm_router.py b/swarms/structs/swarm_router.py index 6371775f..f73cf7a8 100644 --- a/swarms/structs/swarm_router.py +++ b/swarms/structs/swarm_router.py @@ -121,7 +121,7 @@ class SwarmRouter: shared_memory_system (Any, optional): Shared memory system for agents. Defaults to None. rules (str, optional): Rules to inject into every agent. Defaults to None. documents (List[str], optional): List of document file paths to use. Defaults to empty list. - output_type (str, optional): Output format type. Defaults to "string". + output_type (str, optional): Output format type. Defaults to "string". Supported: 'str', 'string', 'list', 'json', 'dict', 'yaml', 'xml'. Attributes: name (str): Name identifier for the SwarmRouter instance @@ -136,7 +136,7 @@ class SwarmRouter: shared_memory_system (Any): Shared memory system for agents rules (str): Rules injected into every agent documents (List[str]): List of document file paths - output_type (str): Output format type + output_type (str): Output format type. Supported: 'str', 'string', 'list', 'json', 'dict', 'yaml', 'xml'. logs (List[SwarmLog]): List of execution logs swarm: The instantiated swarm object