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

<br>128<br>129<br>130<br>131<br>132<br>133<br>134<br>135<br>136<br>137<br>138<br>139<br>140<br>141<br>142<br>143<br>144<br>145<br>146<br>147<br>148<br>149<br>150<br>151<br>152<br>153<br>154<br>155<br>156<br>157<br>158<br>159<br>160<br>161<br>162<br>163<br>164<br>165<br>166<br>167<br>168<br>169<br>170<br>171<br>172<br>173<br>174<br>175<br>176<br>177<br>178<br>179<br>180<br>181<br>182<br>183<br>184<br>185<br>186<br>187<br>188<br>189<br>190<br>191<br>192<br>193<br>194<br>195<br>196<br>197<br>198<br>199<br>200<br>201<br>202<br>203<br>204<br>205<br>206<br>207<br>208<br>209<br>210<br> ```
@export_module("autogen.agentchat")
async def a_initiate_group_chat(
pattern: "Pattern",
messages: list[dict[str, Any]]