fix: groupchat needs more than 2 agents

Signed-off-by: nolan <nolan@exvul.com>
pull/776/head
nolan 2 months ago
parent 123713b242
commit ee442db656

@ -248,8 +248,8 @@ class GroupChat:
Raises: Raises:
ValueError: If any required components are missing or invalid ValueError: If any required components are missing or invalid
""" """
if not self.agents: if len(self.agents)<2:
raise ValueError("No agents provided") raise ValueError("At least two agents are required for a group chat")
if self.speaker_fn is None: if self.speaker_fn is None:
raise ValueError("No speaker function provided") raise ValueError("No speaker function provided")
if self.max_loops <= 0: if self.max_loops <= 0:

Loading…
Cancel
Save