mirror of
https://github.com/microsoft/autogen.git
synced 2025-08-16 12:41:21 +00:00

## Why are these changes needed? This PR enhances the `SelectorGroupChat` class by introducing a new `model_context` parameter to support more context-aware speaker selection. ### Changes - Added a `model_context: ChatCompletionContext | None` parameter to `SelectorGroupChat`. - Defaulted to `UnboundedChatCompletionContext` when None is provided like `AssistantAgent`. - Updated `_select_speaker` to prepend context messages from `model_context` to the main thread history. - Refactored history construction into a helper method `construct_message_history`. ## Related issue number Closes [Issue #6301](https://github.com/org/repo/issues/6301), enabling the group chat manager to utilize `model_context` for richer, more informed speaker selection decisions. ## Checks - [x] I've included any doc changes needed for <https://microsoft.github.io/autogen/>. See <https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to build and test documentation locally. - [x] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [x] I've made sure all auto checks have passed. --------- Signed-off-by: Abhijeetsingh Meena <abhijeet040403@gmail.com> Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
AutoGen AgentChat
AgentChat is a high-level API for building multi-agent applications.
It is built on top of the autogen-core
package.
For beginner users, AgentChat is the recommended starting point.
For advanced users, autogen-core
's event-driven
programming model provides more flexibility and control over the underlying components.
AgentChat provides intuitive defaults, such as Agents with preset behaviors and Teams with predefined multi-agent design patterns.