class_docstr: (In preview) A chat manager agent that can manage a group chat of multiple agents.
class_docstr_tok: ["(","In","preview",")","A","chat","manager","agent","that","can","manage","a","group","chat","of","multiple","agents","."]
code: def __init__(
      self,
      groupchat: GroupChat,
      name: Optional[str] = "chat_manager",
      # unlimited consecutive auto reply by default
      max_consecutive_auto_reply: Optional[int] = sys.maxsize,
      human_input_mode: Optional[str] = "NEVER",
      system_message: Optional[
          Union[str, List]
      ] = "Group chat manager.",
      **kwargs,
  ):
      if kwargs.get("llm_config") and (
          kwargs["llm_config"].get("functions")
          or kwargs["llm_config"].get("tools")
      ):
          raise ValueError(
              "GroupChatManager is not allowed to make function/tool calls. Please remove the 'functions' or 'tools' config in 'llm_config' you passed in."
          )
  
      super().__init__(
          name=name,
          max_consecutive_auto_reply=max_consecutive_auto_reply,
          human_input_mode=human_input_mode,
          system_message=system_message,
          **kwargs,
      )
      # Store groupchat
      self._groupchat = groupchat
  
      # Order of register_reply is important.
      # Allow sync chat if initiated using initiate_chat
      self.register_reply(
          Agent,
          GroupChatManager.run_chat,
          config=groupchat,
          reset_config=GroupChat.reset,
      )
      # Allow async chat if initiated using a_initiate_chat
      self.register_reply(
          Agent,
          GroupChatManager.a_run_chat,
          config=groupchat,
          reset_config=GroupChat.reset,
          ignore_async_in_sync_chat=True,
      )
  
imports: import logging
  import random
  import re
  import sys
  from dataclasses import dataclass
  from typing import Dict, List, Optional, Union, Tuple
  from ..code_utils import content_str
  from .agent import Agent
  from .conversable_agent import ConversableAgent
label_desc: Use image node_id 1 to create a new GroupChatManager object from inherited base classes: ConversableAgent with example: obj = GroupChatManager(groupchat, name, max_consecutive_auto_reply, human_input_mode, system_message)