Skip to content

Commit 526f410

Browse files
committed
[TESTS][MultiAgentRouter]
1 parent e9b7c91 commit 526f410

3 files changed

Lines changed: 336 additions & 37 deletions

File tree

swarms/structs/agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,7 @@ def handle_handoffs(self, task: Optional[str] = None):
697697
agents=self.handoffs,
698698
model=self.model_name,
699699
temperature=self.temperature,
700+
system_prompt=self.system_prompt,
700701
output_type=self.output_type,
701702
)
702703

swarms/structs/conversation.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,6 @@ def save_as_json(self, force: bool = True):
562562
)
563563
return
564564

565-
566565
# Ensure we have a valid save path
567566
if not self.save_filepath:
568567
self.save_filepath = os.path.join(
@@ -577,7 +576,12 @@ def save_as_json(self, force: bool = True):
577576

578577
# Save with proper formatting
579578
with open(self.save_filepath, "w", encoding="utf-8") as f:
580-
json.dump(self.conversation_history, f, indent=4, default=str)
579+
json.dump(
580+
self.conversation_history,
581+
f,
582+
indent=4,
583+
default=str,
584+
)
581585

582586
logger.info(f"Conversation saved to {self.save_filepath}")
583587

@@ -611,9 +615,14 @@ def save_as_yaml(self, force: bool = True):
611615
with open(self.save_filepath, "w", encoding="utf-8") as f:
612616
yaml.dump(
613617
self.conversation_history,
614-
f, indent=4, default_flow_style=False, sort_keys=False
618+
f,
619+
indent=4,
620+
default_flow_style=False,
621+
sort_keys=False,
622+
)
623+
logger.info(
624+
f"Conversation saved to {self.save_filepath}"
615625
)
616-
logger.info(f"Conversation saved to {self.save_filepath}")
617626

618627
except Exception as e:
619628
logger.error(

0 commit comments

Comments
 (0)