autogen icon indicating copy to clipboard operation
autogen copied to clipboard

feat: add support for list of messages as team task input

Open iamarunbrahma opened this issue 1 year ago • 3 comments

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.

iamarunbrahma avatar Dec 03 '24 21:12 iamarunbrahma

@microsoft-github-policy-service agree

iamarunbrahma avatar Dec 03 '24 21:12 iamarunbrahma

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.

ekzhu avatar Dec 04 '24 05:12 ekzhu

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 @ekzhu , yes I have reviewed the python development guide. Kindly, review the updated PR and let me know if you have any more suggesstions

iamarunbrahma avatar Dec 04 '24 10:12 iamarunbrahma