Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yiranwu0 committed Dec 10, 2023
1 parent a1d5aa0 commit ab97630
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions autogen/agentchat/groupchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,20 +259,6 @@ def _mentioned_agents(self, message_content: Union[str, List], agents: List[Agen
Returns:
Dict: a counter for mentioned agents.
"""
# This handles the case when the selector gives a wrong response of making function calls
# take out content, function_calls, tool_calls to put in one string
if isinstance(message_content, dict):
tmp_content = ""
if message_content.get("content"):
tmp_content = message_content["content"]
if message_content.get("function_call"):
tmp_content += message_content["function_call"]["name"] + message_content["function_call"]["arguments"]
if message_content.get("tool_calls"):
for tool_call in message_content["tool_calls"]:
if tool_call.get("type") == "function":
tmp_content += tool_call["function"]["name"] + tool_call["function_call"]["arguments"]
message_content = tmp_content

# Cast message content to str
message_content = content_str(message_content)

Expand Down

0 comments on commit ab97630

Please sign in to comment.