Merge pull request #776 from maldiohead/master

fix: groupchat needs more than 2 agents
pull/781/head
Kye Gomez 2 months ago committed by GitHub
commit 146402e149
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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