A programming framework for agentic AI
Quick fix for the str concatenation bug, but it remains to be discovered why we are getting a 'ChatCompletionMessage' rather than a str. (#809)
afourney4fde1211c2ad
diff --git a/autogen/agentchat/groupchat.py b/autogen/agentchat/groupchat.pyindex a59f035fb..0b52716f1 100644--- a/autogen/agentchat/groupchat.py+++ b/autogen/agentchat/groupchat.py@@ -208,7 +208,7 @@ Then select the next role from {[agent.name for agent in agents]} to play. Onlyregex = (r"(?<=\W)" + re.escape(agent.name) + r"(?=\W)") # Finds agent mentions, taking word boundaries into account- count = len(re.findall(regex, " " + message_content + " ")) # Pad the message to help with matching+ count = len(re.findall(regex, f" {message_content} ")) # Pad the message to help with matchingif count > 0:mentions[agent.name] = countreturn mentions