From 2d52bbcbc565766af80973dc2b566a4c1fb45e4a Mon Sep 17 00:00:00 2001 From: Lery Orlov Date: Thu, 21 Nov 2024 01:35:27 +0100 Subject: [PATCH] fix: GroupChatManager async run throw exception if no eligible speaker (#4283) --- autogen/agentchat/groupchat.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autogen/agentchat/groupchat.py b/autogen/agentchat/groupchat.py index b0f0b9520aa..a648c95e758 100644 --- a/autogen/agentchat/groupchat.py +++ b/autogen/agentchat/groupchat.py @@ -1264,6 +1264,10 @@ async def a_run_chat( else: # admin agent is not found in the participants raise + except NoEligibleSpeaker: + # No eligible speaker, terminate the conversation + break + if reply is None: break # The speaker sends the message without requesting a reply