From efd1bac96fb768e2c9370f8789751d282885c016 Mon Sep 17 00:00:00 2001 From: Valeriy_Orlov Date: Wed, 20 Nov 2024 12:41:30 +0100 Subject: [PATCH] fix: GroupChatManager async run throw exception if no eligible speaker --- autogen/agentchat/groupchat.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autogen/agentchat/groupchat.py b/autogen/agentchat/groupchat.py index b0f0b9520aaf..a648c95e758d 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