a_initiate_group_chat - AG2

a_initiate_group_chat

``autogen.agentchat.a_initiate_group_chatasync[

a_initiate_group_chat(pattern, messages, max_rounds=20, safeguard_policy=None, safeguard_llm_config=None, mask_llm_config=None)

Initialize and run a group chat using a pattern for configuration, asynchronously.

PARAMETER DESCRIPTION
pattern Pattern object that encapsulates the chat configuration.
TYPE:Pattern
messages Initial message(s).
TYPE:`list[dict[str, Any]]
max_rounds Maximum number of conversation rounds.
TYPE:intDEFAULT:20
safeguard_policy Optional safeguard policy dict or path to JSON file.
TYPE:`dict[str, Any]
safeguard_llm_config Optional LLM configuration for safeguard checks.
TYPE:`LLMConfig
mask_llm_config Optional LLM configuration for masking.
TYPE:`LLMConfig
RETURNS DESCRIPTION
ChatResult Conversations chat history.
TYPE:ChatResult
ContextVariables Updated Context variables.
TYPE:ContextVariables
Agent "ConversableAgent": Last speaker.

Source code in autogen/agentchat/group/multi_agent_chat.py

```
@export_module("autogen.agentchat")
async def a_initiate_group_chat(
pattern: "Pattern",
messages: list[dict[str, Any]]
str,
max_rounds: int = 20,
safeguard_policy: dict[str, Any]