feat: add support for list of messages as team task input
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:
- Added support for
List[ChatMessage]as valid task input - Messages are processed sequentially, maintaining conversation flow
- Added validation for message lists (empty lists, invalid message types)
- Maintained backward compatibility with existing string and single message inputs
- Added comprehensive test coverage for the new functionality
Related issue number
Fixes #4472
Checks
- [x] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation 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.
@microsoft-github-policy-service agree
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 python directory.
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
pythondirectory.
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