Repository navigation
fix(agentchat): accept message sequences as group chat tasks - #8424
Open
林SO (Linxiushen) wants to merge 1 commit into
Open
林SO (Linxiushen) wants to merge 1 commit into
林SO (Linxiushen) wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
BaseGroupChat.run()andrun_stream()advertiseSequence[BaseChatMessage], but task validation only accepts lists. A tuple orcollections.UserListof valid messages raisesValueErrorbefore the team runs.Accept sequences in the existing validation branch and update both method docstrings. Parameterize the existing group-chat test over lists, tuples and
UserListin both embedded and supplied runtimes. The test coversrun(), a streamed rerun, message order, unchanged inputs, and empty/invalid-element rejection.Related issue number
Fixes #8422
Validation
d07c667a3239ea4ab7af62a53b0f4ff205a1f23d: the new tuple/UserList cases fail in both runtimes; the two list controls pass (4 failed, 2 passed).test_group_chat.py: 91 passed on Windows, Python 3.12.14.poe format --checkandpoe lint --no-fixpass. Mypy checks all 64 agentchat source/test files successfully using the package task's equivalent command with its config path quoted correctly; the Poe package wrapper splits this workspace's path at a space. Pyright on the two changed files andgit diff --checkalso pass.poe docs-buildsucceeds with 34 warnings, including missing optional extension dependencies. Notebook execution is disabled by the repository configuration.poe mypywas attempted and stops in the unchanged agbench package with four errors involving missing stubs and Docker-related types. The full workspace check has not passed.Core/agentchat were installed using frozen uv sync, with selected test/documentation dependencies added separately (the final installed package inventory is recorded). The 91 group-chat tests also pass after those additions. Full workspace/all-extras tests were not run. Tests use local echo/replay fixtures; no external model service was called.
AI assistance was used to prepare the change and run the recorded local checks.
Checks