autogen/notebook/agentchat_graph_modelling_language_using_select_speaker.ipynb

669 lines
289 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/microsoft/autogen/blob/main/notebook/agentchat_graph_modelling_language_using_select_speaker.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Auto Generated Agent Chat: Graph Modeling Language with using select_speaker\n",
"\n",
"AutoGen offers conversable agents powered by LLM, tool, or human, which can be used to perform tasks collectively via automated chat. This framework allows tool use and human participation through multi-agent conversation.\n",
"Please find documentation about this feature [here](https://microsoft.github.io/autogen/docs/Use-Cases/agent_chat).\n",
"\n",
"This notebook is about using graphs to define the transition paths amongst speakers.\n",
"\n",
"Benefits\n",
"- This contribution fills the gap between the current modes of GroupChat Class (auto, manual, round_robin) and an expressive directed graph. See Motivation for more detailed discussion.\n",
"\n",
"\n",
"## Requirements\n",
"\n",
"AutoGen requires `Python>=3.8`. To run this notebook example, please install:\n",
"```bash\n",
"pip install pyautogen\n",
"```"
]
},
{
"cell_type": "code",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"%%capture --no-stderr\n",
"# %pip install \"pyautogen>=0.2.3\"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"%pip install pyautogen[graph]"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import random # noqa E402\n",
"\n",
"import matplotlib.pyplot as plt # noqa E402\n",
"import networkx as nx # noqa E402\n",
"\n",
"import autogen # noqa E402\n",
Code executors (#1405) * 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>
2024-02-09 20:52:16 -08:00
"from autogen.agentchat.conversable_agent import ConversableAgent # noqa E402\n",
"from autogen.agentchat.assistant_agent import AssistantAgent # noqa E402\n",
Code executors (#1405) * 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>
2024-02-09 20:52:16 -08:00
"from autogen.agentchat.groupchat import GroupChat # noqa E402\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"from autogen.graph_utils import visualize_speaker_transitions_dict # noqa E402"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"0.2.5\n"
]
}
],
"source": [
"print(autogen.__version__)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Motivation\n",
"\n",
"\n",
"The current GroupChat class allows transition to any agent (without or without the decision of LLM), some use case might demand for more control over transition. A graph is a possible way to control the transition paths, where each node represents an agent and each directed edge represent possible transition path. Let's illustrate the current transition paths for a GroupChat with five agents."
]
},
{
"cell_type": "code",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# The default config list in notebook.\n",
"config_list_gpt4 = autogen.config_list_from_json(\n",
" \"OAI_CONFIG_LIST\",\n",
" filter_dict={\n",
" \"model\": [\"gpt-4\", \"gpt-4-0314\", \"gpt4\", \"gpt-4-32k\", \"gpt-4-32k-0314\", \"gpt-4-32k-v0314\"],\n",
" },\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"image/png": "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
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
Code executors (#1405) * 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>
2024-02-09 20:52:16 -08:00
"agents = [ConversableAgent(name=f\"Agent{i}\", llm_config=False) for i in range(5)]\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"allowed_speaker_transitions_dict = {agent: [other_agent for other_agent in agents] for agent in agents}\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"visualize_speaker_transitions_dict(allowed_speaker_transitions_dict, agents)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"### Possibly interesting transition paths\n",
"1. Hub and Spoke\n",
"2. Sequential Team Operations\n",
"3. Think aloud and debate"
]
},
{
"cell_type": "code",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"image/png": "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
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
Code executors (#1405) * 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>
2024-02-09 20:52:16 -08:00
"agents = [ConversableAgent(name=f\"Agent{i}\", llm_config=False) for i in range(5)]\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"allowed_speaker_transitions_dict = {\n",
" agents[0]: [agents[1], agents[2], agents[3], agents[4]],\n",
" agents[1]: [agents[0]],\n",
" agents[2]: [agents[0]],\n",
" agents[3]: [agents[0]],\n",
" agents[4]: [agents[0]],\n",
"}\n",
"\n",
"visualize_speaker_transitions_dict(allowed_speaker_transitions_dict, agents)"
]
},
{
"cell_type": "code",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"execution_count": 7,
"metadata": {},
"outputs": [
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
{
"name": "stdout",
"output_type": "stream",
"text": [
"<autogen.agentchat.agent.Agent object at 0x7fbf958831c0>\n"
]
},
{
"data": {
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAApQAAAHzCAYAAACe1o1DAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAACdWUlEQVR4nOzdd1gUx+MG8HfvDo7emyigCGLv2Bt6aOzRaOwxReM3xfxMT0wxVVNMNMZUE6NRE1ssMTEWFBUbYseGoDRF6SBwcHV/fyCnJ0XK0d/P8/CE2zI7S3R9mdmZEURRFEFEREREVEmS2q4AEREREdVvDJREREREVCUMlERERERUJQyURERERFQlDJREREREVCUMlERERERUJQyURERERFQlDJREREREVCUMlERERERUJQyURERERFQlDJREREREVCUMlERERERUJQyURERERFQlDJREREREVCUMlERERERUJQyURERERFQlDJREREREVCUMlERERERUJQyURERERFQlDJREREREVCUMlERERERUJQyURERERFQlDJREREREVCUMlERERERUJQyURERERFQlDJREREREVCUMlERERERUJQyURERERFQlDJREREREVCUMlERERERUJQyURERERFQlDJREREREVCUMlERERERUJQyURERERFQlDJREREREVCUMlERERERUJQyURERERFQlstquAN2Tp9IiLj0Paq0e5jIJmjtbw1rO/0VERERUtzGt1LLo5BysC09AaFQKEjKUEO/bJwDwdrJCUIAbpvX0hr+7bW1Vk4iIiKhUgiiK4sMPI1NLzFBi/tZIhMWkQSoRoNOX/r+haH9/PxcsHNcBXk5WNVhTIiIiorIxUNaC9REJWPD3RWj1YplB8kFSiQCZRMCHY9phcqB3NdaQiIiIqPwYKGvY8tBoLN5ztcrlvDa0FV4M8jdBjYiIiIiqhqO8a9D6iASThEkAWLznKjZEJJikLCIiIqKqYAtlDUnMUEKx5CBUWj306gLknt0F5dVj0KQlQK8pgNTGCeYu3rBqMwDWbfpB1GqQeWAV1ElR0N5JhV6VB0FmDjOnprBq1Qe2gWNhaWmJkJcH8p1KIiIiqlUMlDVkxq/hOHo9Hfkp8Ujd/BG0WbdLPbbJU8sgsbTDze+fLPUYixZd4DnlE/TxdcaaZ3pWQ42JiIiIyofTBtWA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
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Sequential Team Operations\n",
"# Create an empty directed graph\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"speaker_transitions_dict = {}\n",
"teams = [\"A\", \"B\", \"C\"]\n",
"team_size = 5\n",
"\n",
"\n",
Code executors (#1405) * 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>
2024-02-09 20:52:16 -08:00
"def get_agent_of_name(agents, name) -> ConversableAgent:\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
" for agent in agents:\n",
" if agent.name == name:\n",
" return agent\n",
"\n",
"\n",
"# Create a list of 15 agents 3 teams x 5 agents\n",
Code executors (#1405) * 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>
2024-02-09 20:52:16 -08:00
"agents = [ConversableAgent(name=f\"{team}{i}\", llm_config=False) for team in teams for i in range(team_size)]\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"\n",
"# Loop through each team and add members and their connections\n",
"for team in teams:\n",
" for i in range(team_size):\n",
" member = f\"{team}{i}\"\n",
" # Connect each member to other members of the same team\n",
" speaker_transitions_dict[get_agent_of_name(agents, member)] = [\n",
" get_agent_of_name(agents, name=f\"{team}{j}\") for j in range(team_size) if j != i\n",
" ]\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"# Team leaders connection\n",
"print(get_agent_of_name(agents, name=\"B0\"))\n",
"speaker_transitions_dict[get_agent_of_name(agents, \"A0\")].append(get_agent_of_name(agents, name=\"B0\"))\n",
"speaker_transitions_dict[get_agent_of_name(agents, \"B0\")].append(get_agent_of_name(agents, name=\"C0\"))\n",
"\n",
"visualize_speaker_transitions_dict(speaker_transitions_dict, agents)"
]
},
{
"cell_type": "code",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"image/png": "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
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
Code executors (#1405) * 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>
2024-02-09 20:52:16 -08:00
"agents = [ConversableAgent(name=f\"Agent{i}\", llm_config=False) for i in range(2)]\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"allowed_speaker_transitions_dict = {\n",
" agents[0]: [agents[0], agents[1]],\n",
" agents[1]: [agents[0], agents[1]],\n",
"}\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"visualize_speaker_transitions_dict(allowed_speaker_transitions_dict, agents)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Set your API Endpoint\n",
"\n",
"The [`config_list_from_json`](https://microsoft.github.io/autogen/docs/reference/oai/openai_utils#config_list_from_json) function loads a list of configurations from an environment variable or a json file."
]
},
{
"cell_type": "code",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"# The default config list in notebook.\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"config_list = autogen.config_list_from_json(\n",
" \"OAI_CONFIG_LIST\",\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
" file_location=\".\",\n",
" filter_dict={\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
" \"model\": [\"gpt-3.5-turbo\", \"gpt-35-turbo\", \"gpt-35-turbo-0613\", \"gpt-4\", \"gpt4\", \"gpt-4-32k\"],\n",
" },\n",
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"It first looks for environment variable \"OAI_CONFIG_LIST\" which needs to be a valid json string. If that variable is not found, it then looks for a json file named \"OAI_CONFIG_LIST\". It filters the configs by models (you can filter by other keys as well). Only the gpt-4 models are kept in the list based on the filter condition.\n",
"\n",
"The config list looks like the following:\n",
"```python\n",
"config_list = [\n",
" {\n",
" 'model': 'gpt-4',\n",
" 'api_key': '<your OpenAI API key here>',\n",
" },\n",
" {\n",
" 'model': 'gpt-4',\n",
" 'api_key': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\n",
" 'api_type': 'azure',\n",
" 'api_version': '2023-06-01-preview',\n",
" },\n",
" {\n",
" 'model': 'gpt-4-32k',\n",
" 'api_key': '<your Azure OpenAI API key here>',\n",
" 'base_url': '<your Azure OpenAI API base here>',\n",
" 'api_type': 'azure',\n",
" 'api_version': '2023-06-01-preview',\n",
" },\n",
"]\n",
"```\n",
"\n",
"If you open this notebook in colab, you can upload your files by clicking the file icon on the left panel and then choosing \"upload file\" icon.\n",
"\n",
"You can set the value of config_list in other ways you prefer, e.g., loading from a YAML file."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"## Demonstration"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"`GroupChat` now takes in two optional arguments.\n",
"- speaker_transitions_dict: a dictionary of keys and list as values. The keys are the names of the agents, and the values are the agents that the key agent can transition to. Default is None, in which case a fully connected graph is assumed.\n",
"- is_allowed_graph: whether the speaker_transitions_dict is a list of allowed agents or disallowed agents. Default is True, in which case the speaker_transitions_dict is a list of allowed agents. If set to False, then the speaker_transitions_dict is a list of disallowed agents."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Team Operations\n"
]
},
{
"cell_type": "code",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMQAAAP7CAYAAAC0u1IMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdd1hT5/sG8DshbESWqKiAAgIioDhwAeJeVREHinW0jg7rt7bW1t1qq9Vaa2trl23dExFxYFUciCiigIKyQXAjSzYhJL8/rPmJewAHyP25Li6Tc07OuRMFzJP3fV6RQqFQgIiIiIiIiIiISEWIhQ5ARERERERERERUk1gQIyIiIiIiIiIilcKCGBERERERERERqRQWxIiIiIiIiIiISKWwIEZERERERERERCqFBTEiIiIiIiIiIlIpLIgREREREREREZFKYUGMiIiIiIiIiIhUCgtiRERERERERESkUlgQIyIiIiIiIiIilcKCGBERERERERERqRQWxIiIiIiIiIiISKWwIEZERERERERERCqFBTEiIiIiIiIiIlIpLIgREREREREREZFKYUGMiIiIiIiIiIhUCgtiRERERERERESkUlgQIyIiIiIiIiIilcKCGBERERERERERqRQWxIiIiIiIiIiISKWwIEZERERERERERCqFBTEiIiIiIiIiIlIpLIgREREREREREZFKYUGMiIiIiIiIiIhUCgtiRERERERERESkUlgQIyIiIiIiIiIilcKCGBERERERERERqRQWxIiIiIiIiIiISKWwIEZERERERERERCqFBTEiIiIiIiIiIlIpLIgREREREREREZFKYUGMiIiIiIiIiIhUCgtiRERERERERESkUlgQIyIiIiIiIiIilcKCGBERERERERERqRQWxIiIiIiIiIiISKWwIEZERERERET0Avfu3cP7778Pc3NzaGpqokmTJujfvz/OnDkjdDRYWlpizZo1b3SO5ORkNGjQAAYGBlWSiai2kwgdgIiIiIiIiKi28/b2hlQqxcaNG9GqVSvcvXsXwcHByM7OrrZrSqVSaGhoVNv5HyovL8fYsWPh5uaGsLCwar8eUW3AEWJEREREREREz5GXl4fTp09jxYoV8PT0hIWFBTp37oy5c+di6NChlY6bMmUKGjVqBH19ffTq1QuXLl2qdK79+/ejU6dO0NLSgomJCby8vJT7LC0tsXTpUkyYMAH6+vqYNm0aACA0NBRubm7Q1tZGixYtMHPmTBQVFQEAevbsifT0dMyaNQsikQgikeiVn9+CBQtgZ2eH0aNHv87LQ1QnsSBGRERERERE9Bx6enrQ09NDQEAAysrKnnncqFGjkJmZiaCgIFy8eBEuLi7o3bs3cnJyAAAHDx6El5cXBg0ahKioKAQHB6Nz586VzrFq1So4OzsjKioKCxcuREpKCgYMGABvb29cvnwZO3fuRGhoKGbMmAEA8Pf3R/PmzbFkyRLcvn0bt2/fVp5LJBJhw4YNz31ux48fx+7du/HLL7+85qtDVDeJFAqFQugQRERERERERLXZnj17MHXqVJSUlMDFxQUeHh7w8fGBk5MTgAejuAYPHozMzExoamoqH2dtbY05c+Zg2rRp6NatG1q1aoUtW7Y89RqWlpZo37499u7dq9w2ZcoUqKmp4ffff1duCw0NhYeHB4qKiqClpQVLS0t8/PHH+Pjjjyudz87ODsuXL680Cu1R2dnZaN++PbZs2QJ3d3ds2LABH3/8MfLy8l7zVSKqOzhCjIiIiIiIiOgFvL29cevWLQQGBmLAgAE4efIkXFxclCOwLl26hMLCQhgbGytHlOnp6SEtLQ0pKSkAgOjoaPTu3fu51+nYsWOl+5cuXcKGDRsqnbN///6Qy+VIS0t77rni4+OfWQwDgKlTp2LcuHFwd3d/iVeAqH5hQYzqjfq46ktCQgI8PT3RuHFjaGlpoVWrVliwYAHKy8urPiQRERERET2XlpYW+vbti4ULFyIsLAyTJk3C4sWLAQCFhYVo2rQpoqOjK30lJCTgs88+AwBoa2u/8Bq6urqV7hcWFmL69OmVznnp0iUkJSXBysrqjZ7P8ePHsWrVKkgkEkgkErz77ru4f/8+JBIJ/v777zc6N1Ftx1Umqd6oj6u+qKurY8KECXBxcYGBgQEuXbqEqVOnQi6XY9myZdV2XSIiIiIierE2bdogICAAAODi4oI7d+5AIpHA0tLyqcc7OTkhODgYkydPfulruLi44OrVq7C2tn7mMRoaGqioqHiV6ACAs2fPVnrcvn37sGLFCoSFhaFZs2avfD6iuoQjxKheqK+rvrRq1QqTJ0+Gs7MzLCwsMHToUPj6+uL06dNv8nIREREREdEryM7ORq9evbBlyxZcvnwZaWlp2L17N1auXIlhw4YBAPr06YOuXbti+PDhOHLkCK5du4awsDDMnz8fFy5cAAAsXrwY27dvx+LFixEXF4eYmBisWLHiudf+/PPPERYWhhkzZiA6OhpJSUnYt2+fsqk+8OB9SkhICG7evImsrCzldjs7u0r9yB5nb2+Ptm3bKr+aNWsGsViMtm3bwtDQ8E1eMqJajwUxqhfq86ovj0pOTsbhw4fh4eHxCq8OERERERG9CT09Pbi6uuKHH36Au7s72rZti4ULF2Lq1Kn4+eefATz4v/2hQ4fg7u6OyZMno3Xr1vDx8UF6ejoaN24M4MGH5bt370ZgYCDatWuHXr164fz588+9tpOTE06dOoXExES4ubmhffv2WLRoEczMzJTHLFmyBNeuXYOVlRUaNWqk3J6QkID79+9XwytCVPdxlUmqN+rjqi8PdevWDZGRkSgrK8O0adPw66+/QixmPZuIiIiIiIjodfAdNdUb9XHVl4d27tyJyMhIbNu2DQcPHsSqVate+BgiIiIiIiIiejo21ad65eGqLw9XfpkyZQoWL16MSZMmKVd9OXny5BOPMzAwAPBmq77MnDnziWPNzc1f63k8rkWLFgAeNO2sqKjAtGnT8Omnn0JNTa1Kzk9ERERERESkSlgQo3qtrq/68jRyuRzl5eWQy+UsiBERERERERG9Bk6ZpHqhvq76snXrVuzatQtxcXFITU3Frl27MHfuXIwZMwbq6upv8pIRERERERERqSyOEKN64dFVX1JSUlBeXo4WLVpg6tSpmDdvHoD/X/Vl/vz5mDx5Mu7du4cmTZrA3d39iVVfli5dim+//Rb6+vpwd3d/7rUfrvoyf/58uLm5QaFQwMrKCmPGjFEes2TJEkyfPh1WVlYoKyvDw7UsXrTqi0QiwYoVK5CYmAiFQgELCwvMmDEDs2bNetOXjIiIiIiIiEhlcZVJIiIiIiIiIiJSKZwySUREREREREREKoUFMSIiIiIiIiIiUiksiBERERERERERkUphQYyIiIiIiIiIiFQKC2JERERERERERKRSWBAjIiIiIiIiIiKVwoIYERERERERERGpFBbEiIiIiIiIiIhIpbAgRkREREREREREKoUFMSIiIiIiIiIiUiksiBERERERERERkUphQYyIiIiIiIiIiFQKC2JERERERERERKRSWBAjIiIiIiIiIiKVwoIYERERERERERGpFBbEiIiIiIiIiIhIpbAgRkREREREREREKoUFMSIiIiIiIiIiUiksiBERERERERERkUphQYyIiIiIiIiIiFQKC2JERERERERERKRSWBAjIiIiIiIiIiKVwoIYERERERERERGpFBbEiIiIiIiIiIhIpbAgRkREREREREREKoUFMSIiIiIiIiIiUiksiBERERERERERkUphQYyIiIiIiIiIiFQKC2JERERERERERKRSJEIHICIiIiIiIqLKispkuJZdBKlMDg2JGJbGutDV5Ft4oqrC7yYiIiIiIiKiWiDpbgG2hmfgREImMnKKoXhknwiAuZEOPG1N4etqDpvGDYSKSVQviBQKheLFhxERERERERFRdbieU4x5e2NwOjkLamIRKuTPfpv+cL+btQmWeTmihZFODSYlqj9YECMiIiIiIiISyI6IDCwOvAKZXPHcQtjj1MQiSMQifDXUAT6dzKsxIVH9xIIYERE
"text/plain": [
"<Figure size 1200x1000 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# llm config\n",
"llm_config = {\"config_list\": config_list_gpt4, \"cache_seed\": 100}\n",
"\n",
"# Create an empty directed graph\n",
"agents = []\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"speaker_transitions_dict = {}\n",
"secret_values = {}\n",
"\n",
"# Outer loop for prefixes 'A', 'B', 'C'\n",
"for prefix in [\"A\", \"B\", \"C\"]:\n",
" # Add 3 nodes with each prefix to the graph using a for loop\n",
" for i in range(3):\n",
" node_id = f\"{prefix}{i}\"\n",
" secret_value = random.randint(1, 5) # Generate a random secret value\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
" secret_values[node_id] = secret_value\n",
"\n",
" # Create an AssistantAgent for each node (assuming AssistantAgent is a defined class)\n",
" agents.append(\n",
" AssistantAgent(\n",
" name=node_id,\n",
" system_message=f\"\"\"Your name is {node_id}.\n",
" Do not respond as the speaker named in the NEXT tag if your name is not in the NEXT tag. Instead, suggest a relevant team leader to handle the mis-tag, with the NEXT: tag.\n",
"\n",
" You have {secret_value} chocolates.\n",
"\n",
" The list of players are [A0, A1, A2, B0, B1, B2, C0, C1, C2].\n",
"\n",
" Your first character of your name is your team, and your second character denotes that you are a team leader if it is 0.\n",
" CONSTRAINTS: Team members can only talk within the team, whilst team leader can talk to team leaders of other teams but not team members of other teams.\n",
"\n",
" You can use NEXT: to suggest the next speaker. You have to respect the CONSTRAINTS, and can only suggest one player from the list of players, i.e., do not suggest A3 because A3 is not from the list of players.\n",
" Team leaders must make sure that they know the sum of the individual chocolate count of all three players in their own team, i.e., A0 is responsible for team A only.\n",
"\n",
" Keep track of the player's tally using a JSON format so that others can check the total tally. Use\n",
" A0:?, A1:?, A2:?,\n",
" B0:?, B1:?, B2:?,\n",
" C0:?, C1:?, C2:?\n",
"\n",
" If you are the team leader, you should aggregate your team's total chocolate count to cooperate.\n",
" Once the team leader know their team's tally, they can suggest another team leader for them to find their team tally, because we need all three team tallys to succeed.\n",
" Use NEXT: to suggest the next speaker, e.g., NEXT: A0.\n",
"\n",
" Once we have the total tally from all nine players, sum up all three teams' tally, then terminate the discussion using TERMINATE.\n",
"\n",
" \"\"\",\n",
" llm_config=llm_config,\n",
" )\n",
" )\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
" speaker_transitions_dict[agents[-1]] = []\n",
"\n",
" # Add edges between nodes with the same prefix using a nested for loop\n",
" for source_node in range(3):\n",
" source_id = f\"{prefix}{source_node}\"\n",
" for target_node in range(3):\n",
" target_id = f\"{prefix}{target_node}\"\n",
" if source_node != target_node: # To avoid self-loops\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
" speaker_transitions_dict[get_agent_of_name(agents, source_id)].append(\n",
" get_agent_of_name(agents, name=target_id)\n",
" )\n",
"\n",
"\n",
"# Adding edges between teams\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"speaker_transitions_dict[get_agent_of_name(agents, \"A0\")].append(get_agent_of_name(agents, name=\"B0\"))\n",
"speaker_transitions_dict[get_agent_of_name(agents, \"A0\")].append(get_agent_of_name(agents, name=\"C0\"))\n",
"speaker_transitions_dict[get_agent_of_name(agents, \"B0\")].append(get_agent_of_name(agents, name=\"A0\"))\n",
"speaker_transitions_dict[get_agent_of_name(agents, \"B0\")].append(get_agent_of_name(agents, name=\"C0\"))\n",
"speaker_transitions_dict[get_agent_of_name(agents, \"C0\")].append(get_agent_of_name(agents, name=\"A0\"))\n",
"speaker_transitions_dict[get_agent_of_name(agents, \"C0\")].append(get_agent_of_name(agents, name=\"B0\"))\n",
"\n",
"\n",
"# Visualization only\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"graph = nx.DiGraph()\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"# Add nodes\n",
"graph.add_nodes_from([agent.name for agent in agents])\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"# Add edges\n",
"for key, value in speaker_transitions_dict.items():\n",
" for agent in value:\n",
" graph.add_edge(key.name, agent.name)\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"# Visualize\n",
"\n",
"\n",
"# Draw the graph with secret values annotated\n",
"plt.figure(figsize=(12, 10))\n",
"pos = nx.spring_layout(graph) # positions for all nodes\n",
"\n",
"# Draw nodes with their colors\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"nx.draw(graph, pos, with_labels=True, font_weight=\"bold\")\n",
"\n",
"# Annotate secret values\n",
"for node, (x, y) in pos.items():\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
" secret_value = secret_values[node]\n",
" plt.text(x, y + 0.1, s=f\"Secret: {secret_value}\", horizontalalignment=\"center\")\n",
"\n",
"plt.show()"
]
},
{
"cell_type": "code",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"# Termination message detection\n",
"\n",
"\n",
"def is_termination_msg(content) -> bool:\n",
" have_content = content.get(\"content\", None) is not None\n",
" if have_content and \"TERMINATE\" in content[\"content\"]:\n",
" return True\n",
" return False\n",
"\n",
"\n",
"# Terminates the conversation when TERMINATE is detected.\n",
"user_proxy = autogen.UserProxyAgent(\n",
" name=\"User_proxy\",\n",
" system_message=\"Terminator admin.\",\n",
" code_execution_config=False,\n",
" is_termination_msg=is_termination_msg,\n",
" human_input_mode=\"NEVER\",\n",
")\n",
"\n",
"agents.append(user_proxy)"
]
},
{
"cell_type": "code",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"execution_count": 12,
"metadata": {},
"outputs": [
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING:root:Warning: There are agents in self.agents not in graph.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[33mA0\u001b[0m (to chat_manager):\n",
"\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
" There are 9 players in this game, split equally into Teams A, B, C. Therefore each team has 3 players, including the team leader.\n",
" The task is to find out the sum of chocolate count from all nine players. I will now start with my team.\n",
" NEXT: A1\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mA1\u001b[0m (to chat_manager):\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"Sure, I, A1, have 3 chocolates. NEXT: A2\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mA2\u001b[0m (to chat_manager):\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"As A2, I have 5 chocolates.\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"So currently our tally is:\n",
"A0:?, A1:3, A2:5, B0:?, B1:?, B2:?, C0:?, C1:?, C2:?\n",
" \n",
"NEXT: A0\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mA0\u001b[0m (to chat_manager):\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"Okay, as A0, I have 1 chocolate.\n",
"\n",
"Therefore, total chocolate count of team A is: \n",
"1 (A0's chocolates) + 3 (A1's chocolates) + 5 (A2's chocolates) = 9 chocolates \n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"The running tally is:\n",
"A0:1, A1:3, A2:5, \n",
"B0:?, B1:?, B2:?, \n",
"C0:?, C1:?, C2:?\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"I suggest we move on to the next team. \n",
"\n",
"NEXT: B0\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mB0\u001b[0m (to chat_manager):\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"As B0, I need to gather the count from my team members. \n",
"\n",
"NEXT: B1\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mB1\u001b[0m (to chat_manager):\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"As B1, I have 1 chocolate. \n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"NEXT: B2\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mB2\u001b[0m (to chat_manager):\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"As B2, I have 4 chocolates. \n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"So currently, our team B tally is:\n",
"B0:?, B1:1, B2:4 \n",
"\n",
"NEXT: B0\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mB0\u001b[0m (to chat_manager):\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"As B0, I have 1 chocolate. So, the total chocolate count for team B is:\n",
"1 (B0's chocolates) + 1 (B1's chocolates) + 4 (B2's chocolates) = 6 chocolates.\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"The updated tally is:\n",
"A0:1, A1:3, A2:5, \n",
"B0:1, B1:1, B2:4, \n",
"C0:?, C1:?, C2:?\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"I suggest we move on to the next team.\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"NEXT: C0\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mC0\u001b[0m (to chat_manager):\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"As C0, I will now gather the count from my team members. \n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"NEXT: C1\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mC1\u001b[0m (to chat_manager):\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"As C1, I have 2 chocolates.\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"NEXT: C2\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mC2\u001b[0m (to chat_manager):\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"As C2, I have 1 chocolate.\n",
"\n",
"So currently, our team C tally is:\n",
"C0:?, C1:2, C2:1\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"NEXT: C0\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mC0\u001b[0m (to chat_manager):\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"As C0, I'm the team leader and I have 1 chocolate. So, the total chocolate count for team C is:\n",
"1 (C0's chocolates) + 2 (C1's chocolates) + 1 (C2's chocolates) = 4 chocolates.\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"The final tally is:\n",
"A0:1, A1:3, A2:5, \n",
"B0:1, B1:1, B2:4, \n",
"C0:1, C1:2, C2:1\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"Now, the sum of chocolates from all nine players is:\n",
"9 (team A's chocolates) + 6 (team B's chocolates) + 4 (team C's chocolates) = 19 chocolates.\n",
"\n",
"TERMINATE.\n",
"\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"\n",
"--------------------------------------------------------------------------------\n"
]
}
],
"source": [
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"group_chat = GroupChat(\n",
" agents=agents,\n",
" messages=[],\n",
" max_round=20,\n",
" allowed_or_disallowed_speaker_transitions=speaker_transitions_dict,\n",
" speaker_transitions_type=\"allowed\",\n",
")\n",
"\n",
"\n",
"# Create the manager\n",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"manager = autogen.GroupChatManager(\n",
" groupchat=group_chat, llm_config=llm_config, code_execution_config=False, is_termination_msg=is_termination_msg\n",
")\n",
"\n",
"\n",
"# Initiates the chat with Alice\n",
"agents[0].initiate_chat(\n",
" manager,\n",
" message=\"\"\"\n",
" There are 9 players in this game, split equally into Teams A, B, C. Therefore each team has 3 players, including the team leader.\n",
" The task is to find out the sum of chocolate count from all nine players. I will now start with my team.\n",
" NEXT: A1\"\"\",\n",
")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
Graph group chat (#857) * 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 https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#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>
2024-02-06 14:13:18 +11:00
"version": "3.11.7"
}
},
"nbformat": 4,
"nbformat_minor": 4
}