* Initial commit with ability to add transforms to GroupChat
* Added tests
* Tidy up
* Tidy up of variable names and commented out test
* Tidy up comment
* Update import to relative
* Added documentation topic for transform messages for speaker selection.
* Added handling of non-core module, transforms, in groupchat
* Adjusted parameter if module not loaded.
* Updated groupchat test which failed during CI/CD
---------
Co-authored-by: Li Jiang <bnujli@gmail.com>
* Update to ensure name on initial messages
* Corrected test cases for messages now including names.
* Added name to messages within select speaker nested chat
* Corrected select speaker group chat tests for name field
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* allow function to remove termination string in groupchat
* improve docstring
Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>
* improve docstring
Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>
* improve test case description
Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>
---------
Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>
* Added 'role' as a summary_args and to the reflection_with_llm flow to be able to pass the role for the summarizing prompt
* Added 'role' as a summary_args and to the reflection_with_llm flow to be able to pass the role for the summarizing prompt, minor docstring adjustments
* Added test for summary prompt role assignment
* Fixed docstrings and mocked llm-config in the test
* Update autogen/agentchat/conversable_agent.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* ran pre-commit
* ran pre-commit2
* fixed old arg name
* Delete dasdaasd
No idea what this file was about
* Fixed incorrect merge update on test_groupchat
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Initial resume
* Cleaned up resume function
* Further updating resuming group chat
* Added async resume_chat and documentation
* Added test cases, refined group chat function parameters
* compiled documentation
* Added tests to main
* Removed mdx file.
* Revert "Merge remote-tracking branch 'origin/main' into groupchatresume"
This reverts commit 8f709308f049d6f07f32a93db6900ef05a130751, reversing
changes made to 8bfcb2bff13384877ec6734f6d5ddcb1a028246d.
* Refactored resume to remove initiate_chat
* fix git history
* fix history
* Added clean-up of objects, _groupchat references, and messages_to_string updated
* Added termination-based resumption in notebook, added test cases and improved robustness on resuming messages parameter
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Added requery_on_multiple_speaker_names to GroupChat and updated _finalize_speaker to requery on multiple speaker names (if enabled)
* Removed unnecessary comments
* Update to current main
* Tweak error message.
* Comment clarity
* Expanded description of Group Chat requery_on_multiple_speaker_names
* Reworked to two-way nested chat for speaker selection with default of 2 retries.
* Adding validation of new GroupChat attributes
* Updates as per @ekzhu's suggestions
* Update groupchat
- Added select_speaker_auto_multiple_template and select_speaker_auto_none_template
- Added max_attempts comment
- Re-instated support for role_for_select_speaker_messages
-
* Update conversable_agent.py
Added ability to force override role for a message to support select speaker prompt.
* Update test_groupchat.py
Updated existing select_speaker test functions as underlying approach has changed, added necessary tests for new functionality.
* Removed block for manual selection in select_speaker function.
* Catered for no-selection during manual selection mode
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Re-commit of code from PR (#2167) addressing #1861, due to wrong basing
* Update website/docs/topics/non-openai-models/best-tips-for-nonopenai-models.md
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Removed unnecessary notebook images
* Update conversation-patterns.ipynb
Updated to include note about being applicable when auto.
* Updated to include checks that the role is not blank/None. Added tests.
* Changed try-except to use pytest
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* init PR
* update
* update code check
* update
* update
* update
* update
* Test the ability to have agents a,u,t,o,g,e,n speak in turn.
* update
* update
* update
* Evidence that groupchat not terminating because of the TERMINATE substring.
* Raising NoEligibleSpeakerException allows graceful exit before max turns
* update
* To confirm with author that custom function is meant to override graph constraints
* Confirmed the expected test behaviour with author
* Update autogen/agentchat/groupchat.py
* update
* update
---------
Co-authored-by: Joshua Kim <Joshua@spectdata.com>
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
* resolved errors happening when using function calling and clear history
* checking in nr_of_messages_to_preserve were provided
* code formatting
* test added, dict signature improved
* test added, dict signature improved
* test added, dict signature improved
* test added, dict signature improved
* test added, dict signature improved
* test added, dict signature improved
* test added, dict signature improved
* test added, dict signature improved
* Test updated
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* test improved
* test improved
* comment about preserving additional message added
* commentary about clear history called in tool response improved
* created test for clear hisotry called from tool response
* code formatting
* added 'USER INTERRUPTED' as internal content of tool response
* added separate vatiable 'nr_messages_to_preserve_internal'
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Allow the GroupChatManager to send introductions.
* Fixed function name.
* Added test cases for sending introductions.
* Trying to sort out why remote pytest is failing.
* Fixed broken plugin behavior.
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Updated as per Chi's suggestions.
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* implements features
* fix docstring
* adds test
* resolve some comments
* remove unused group chat manager from test
* list implementation
* better naming
* resolve comments
* adds one more test
* checks case when agent doesnt exist
* clean up
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* code executor
* test
* revert to main conversable agent
* prepare for pr
* kernel
* run open ai tests only when it's out of draft status
* update workflow file
* revert workflow changes
* ipython executor
* check kernel installed; fix tests
* fix tests
* fix tests
* update system prompt
* Update notebook, more tests
* notebook
* raise instead of return None
* allow user provided code executor.
* fixing types
* wip
* refactoring
* polishing
* fixed failing tests
* resolved merge conflict
* fixing failing test
* wip
* local command line executor and embedded ipython executor
* revert notebook
* fix format
* fix merged error
* fix lmm test
* fix lmm test
* move warning
* name and description should be part of the agent protocol, reset is not as it is only used for ConversableAgent; removing accidentally commited file
* version for dependency
* Update autogen/agentchat/conversable_agent.py
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
* ordering of protocol
* description
* fix tests
* make ipython executor dependency optional
* update document optional dependencies
* Remove exclude from Agent protocol
* Make ConversableAgent consistent with Agent
* fix tests
* add doc string
* add doc string
* fix notebook
* fix interface
* merge and update agents
* disable config usage in reply function
* description field setter
* customize system message update
* update doc
---------
Co-authored-by: Davor Runje <davor@airt.ai>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
Co-authored-by: Aaron <aaronlaptop12@hotmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Move contrib-openai.yml
* Moved groupgroupchat
* From #753
* Removed local test references
* Added ignore=test/agentchat/contrib
* Trying to pass contrib-openai tests
* More specific in unit testing.
* Update .github/workflows/contrib-tests.yml
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
* Remove coverage as it is included in test dependencies
* Improved docstring with overview of GraphGroupChat
* Iterate on feedback
* Precommit pass
* user just use pip install pyautogen[graphs]
* Pass precommit
* Pas precommit
* Graph utils an test completed
* Added inversion tests
* Added inversion util
* allow_repeat_speaker can be a list of Agents
* Remove unnessary imports
* Expect ValueError with 1 and 0 agents
* Check that main passes all tests
* Check main
* Pytest all in main
* All done
* pre-commit changes
* noqa E402
* precommit pass
* Removed bin
* Removed old unit test
* Test test_graph_utils
* minor cleanup
* restore tests
* Correct documentation
* Special case of only one agent remaining.
* Improved pytest
* precommit pass
* Delete OAI_CONFIG_LIST_sample copy
* Returns a filtered list for auto to work
* Rename var speaker_order_dict
* To write test cases
* Added check for a list of Agents to repeat
* precommit pass
* Update documentation
* Extract names in allow_repeat_speaker
* Post review changes
* hange "pull_request_target" into "pull_request" temporarily.
* 3 return values from main
* pre-commit changes
* PC edits
* docstr changes
* PC edits
* Rest of changes from main
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Remove unnecessary script files from tracking
* Non empty scripts files from main
* Revert changes in script files to match main branch
* Removed link from website as notebook is removed.
* test/test_graph_utils.py is tested as part of L52 of build.yml
* GroupChat ValueError check
* docstr update
* More clarification in docstr
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* 1.add commit to line138 in groupchat.py;2.fix bug if random choice [];3.return selected_agent if len(graph_eligible_agents) is 1;4.replace all speaker_order to speaker_transitions;5.format
* fix graph_modelling notebook in the last cell
* fix failure in test_groupchat.py
* fix agent out of group to initiate a chat like SocietyOfMind
* add a warning rule in graph_utils to check duplicates in any lists
* refactor allowed_or_disallowed_speaker_transitions to Dict[Agent, List[Agent]] and modify the tests and notebook
* delete Rule 4 in graph_utils and related test case. Add a test to resolve 993fd006e9 (r1460726831)
* fix as the final comments
* modify setup option from graphs to graph and add texts in optional-dependencies.md
* Update autogen/graph_utils.py
---------
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
Co-authored-by: Beibin Li <BeibinLi@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: Yishen Sun <freedeaths@FREEDEATHS-XPS>
Co-authored-by: freedeaths <register917@gmail.com>
* functionality of manual history cleaning by admin added
* formatting improved
* formatting improved 2
* formatting improved 3
* test function added
* test code formatting
* test code formatting 2
* more advanced logging. Now user can see nr of messages to preserve as confirmation
* test_invalid_allow_repeat_speaker uncommented
* warning when providing recepient agent and nr messages to preserve added, changed variables names
* code formatting
* code formatting
* code formatting
* added 'enable_clear_history' variable to GroupChat
* 'enable_clear_history' added, better descripted
* clearing groupchat history added
* clearing groupchat history added
* two ifs merged into one, formatting improved
* two ifs merged into one, formatting improved
* two ifs merged into one, formatting improved
* formatting
* formatting
---------
Co-authored-by: Davor Runje <davor@airt.ai>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Makes select_speaker more robust by checking for agents mentioned anywhere in the selection string. Addresses 663.
* Added test coverage for group chat mentions. Refactored mention counter to own function.
* Fixed pre-commit formatting.