From 5bcf0ae6229748da90b813d2e86ceb4c98782349 Mon Sep 17 00:00:00 2001 From: Kumaran Rajendhiran Date: Fri, 3 Jan 2025 19:49:17 +0530 Subject: [PATCH] Refactor getting agent names --- autogen/messages/agent_messages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autogen/messages/agent_messages.py b/autogen/messages/agent_messages.py index 84fe1110b9..f9558984d0 100644 --- a/autogen/messages/agent_messages.py +++ b/autogen/messages/agent_messages.py @@ -260,8 +260,8 @@ def __init__(self, *, uuid: Optional[UUID] = None, chat_info: dict[str, Any]): message = chat_info.get("message") verbose = chat_info.get("verbose", False) - sender_name = chat_info.get("sender").name # type: ignore [union-attr] - recipient_name = chat_info.get("recipient").name # type: ignore [union-attr] + sender_name = chat_info["sender"].name + recipient_name = chat_info["recipient"].name summary_args = chat_info.get("summary_args", None) max_turns = chat_info.get("max_turns", None)