mirror of
https://github.com/microsoft/autogen.git
synced 2026-02-18 01:11:25 -05:00
Quick fix for the str concatenation bug, but it remains to be discovered why we are getting a 'ChatCompletionMessage' rather than a str. (#809)
This commit is contained in:
@@ -208,7 +208,7 @@ Then select the next role from {[agent.name for agent in agents]} to play. Only
|
||||
regex = (
|
||||
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 matching
|
||||
if count > 0:
|
||||
mentions[agent.name] = count
|
||||
return mentions
|
||||
|
||||
Reference in New Issue
Block a user