From 19de99e3f6e46f6040d54c4a55785d02158dec28 Mon Sep 17 00:00:00 2001 From: Rick Date: Fri, 17 May 2024 15:38:17 -0700 Subject: [PATCH] Update groupchat.py to remove Optional type hint when they are not checked for None (#2703) --- autogen/agentchat/groupchat.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autogen/agentchat/groupchat.py b/autogen/agentchat/groupchat.py index b1141cfdacf3..8b782f7d6948 100644 --- a/autogen/agentchat/groupchat.py +++ b/autogen/agentchat/groupchat.py @@ -101,15 +101,15 @@ def custom_speaker_selection_func( agents: List[Agent] messages: List[Dict] - max_round: Optional[int] = 10 - admin_name: Optional[str] = "Admin" - func_call_filter: Optional[bool] = True + max_round: int = 10 + admin_name: str = "Admin" + func_call_filter: bool = True speaker_selection_method: Union[Literal["auto", "manual", "random", "round_robin"], Callable] = "auto" - max_retries_for_selecting_speaker: Optional[int] = 2 + max_retries_for_selecting_speaker: int = 2 allow_repeat_speaker: Optional[Union[bool, List[Agent]]] = None allowed_or_disallowed_speaker_transitions: Optional[Dict] = None speaker_transitions_type: Literal["allowed", "disallowed", None] = None - enable_clear_history: Optional[bool] = False + enable_clear_history: bool = False send_introductions: bool = False select_speaker_message_template: str = """You are in a role play game. The following roles are available: {roles}.