Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async version of multiple sequential chat #1724

Merged
merged 8 commits into from
Feb 21, 2024

Conversation

randombet
Copy link
Collaborator

Why are these changes needed?

This PR add a new a_initiate_chats interface to add concurrent execution in comparison to initiate_chats interface.
It allows one to pass multiple tasks and their corresponding dedicated agents and execute concurrently. Depending on the prerequisite task(s), the tasks will be solved in a concurrent manner.

Related issue number

Closes #1596

Checks

@codecov-commenter
Copy link

codecov-commenter commented Feb 19, 2024

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (a34e4cc) 39.35% compared to head (3864851) 59.13%.

Files Patch % Lines
autogen/agentchat/chat.py 87.20% 5 Missing and 6 partials ⚠️
autogen/agentchat/conversable_agent.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1724       +/-   ##
===========================================
+ Coverage   39.35%   59.13%   +19.77%     
===========================================
  Files          57       57               
  Lines        6093     6171       +78     
  Branches     1362     1502      +140     
===========================================
+ Hits         2398     3649     +1251     
+ Misses       3499     2235     -1264     
- Partials      196      287       +91     
Flag Coverage Δ
unittests 59.09% <87.23%> (+19.74%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

test/agentchat/test_assistant_agent.py Outdated Show resolved Hide resolved
test/agentchat/test_async_chats.py Show resolved Hide resolved
notebook/agentchat_multi_task_async_chats.ipynb Outdated Show resolved Hide resolved
Copy link
Contributor

@qingyun-wu qingyun-wu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in the PR look great! Thank you @randombet! I think it would be even better if we also add methods such as add_chat, remove_chat which allow one to add or remove chat in the chat_queue concurrent to a_initiate_chats. This could be done in a separate PR!

@qingyun-wu qingyun-wu added this pull request to the merge queue Feb 21, 2024
Merged via the queue into microsoft:main with commit a4ab4cc Feb 21, 2024
50 of 57 checks passed
@randombet
Copy link
Collaborator Author

The changes in the PR look great! Thank you @randombet! I think it would be even better if we also add methods such as add_chat, remove_chat which allow one to add or remove chat in the chat_queue concurrent to a_initiate_chats. This could be done in a separate PR!

Cool. Let's do it in another PR

whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
* async_initiate_chats init commit

* Fix a_get_human_input bug

* Add agentchat_multi_task_async_chats.ipynb with concurrent exampls.

* Addess the comments, Update unit test

* Add agentchat_multi_task_async_chats.ipynb to Examples.md

* Fix type for Python 3.8

---------

Co-authored-by: Qingyun Wu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue]: Async version of multiple sequential chat
4 participants