-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for list of messages as team task input #4500
Conversation
@microsoft-github-policy-service agree |
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py
Outdated
Show resolved
Hide resolved
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py
Outdated
Show resolved
Hide resolved
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py
Outdated
Show resolved
Hide resolved
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py
Outdated
Show resolved
Hide resolved
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py
Outdated
Show resolved
Hide resolved
Thanks @iamarunbrahma for the PR. It's a good start, but to finish it is going to be some more work. Please let us know ASAP when you are blocked. please also review the Python development guide under |
65f9bcb
to
424da3d
Compare
Thanks @ekzhu , yes I have reviewed the python development guide. Kindly, review the updated PR and let me know if you have any more suggesstions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 suggestion.
Comments skipped due to low confidence (2)
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py:367
- Use parentheses for the union of types in the isinstance check: isinstance(task, (TextMessage, MultiModalMessage, StopMessage, HandoffMessage)).
elif isinstance(task, TextMessage | MultiModalMessage | StopMessage | HandoffMessage):
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py:371
- [nitpick] The error message 'Task list cannot be empty' could be more descriptive, e.g., 'The task list provided is empty. Please provide at least one valid ChatMessage.'
raise ValueError("Task list cannot be empty")
...ckages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat_manager.py
Outdated
Show resolved
Hide resolved
…_group_chat/_base_group_chat_manager.py Co-authored-by: Copilot <[email protected]>
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py
Outdated
Show resolved
Hide resolved
...ckages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat_manager.py
Outdated
Show resolved
Hide resolved
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_events.py
Outdated
Show resolved
Hide resolved
…type using 'type' attribute
…entic_one_orchestrator.py
…handling in _base_group_chat_manager, _chat_agent_container, and _magentic_one_orchestrator.
...ckages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat_manager.py
Outdated
Show resolved
Hide resolved
… in _base_group_chat_manager and _swarm_group_chat
python/packages/autogen-agentchat/src/autogen_agentchat/agents/_base_chat_agent.py
Show resolved
Hide resolved
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py
Outdated
Show resolved
Hide resolved
9a19b1d
to
9666740
Compare
…ted result in test_run_with_tools
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py
Outdated
Show resolved
Hide resolved
python/packages/autogen-agentchat/src/autogen_agentchat/teams/_group_chat/_base_group_chat.py
Outdated
Show resolved
Hide resolved
...gentchat/src/autogen_agentchat/teams/_group_chat/_magentic_one/_magentic_one_orchestrator.py
Outdated
Show resolved
Hide resolved
…start process instead of just the first one
Why are these changes needed?
Currently, a team only supports a single message as input for a task. This limits the ability to prepopulate context for agents, especially when working with previous conversation histories or nested chats. This PR adds support for passing a list of messages as task input, enabling better integration with applications where users might type multiple messages before triggering the team run.
Key changes:
List[ChatMessage]
as valid task inputRelated issue number
Resolves #4472
Checks