Skip to content

Async version of multiple sequential chat#1724

Merged
qingyun-wu merged 8 commits into
microsoft:mainfrom
randombet:async_chats
Feb 21, 2024
Merged

Async version of multiple sequential chat#1724
qingyun-wu merged 8 commits into
microsoft:mainfrom
randombet:async_chats

Conversation

@randombet

Copy link
Copy Markdown
Contributor

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

codecov-commenter commented Feb 19, 2024

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.23404% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.13%. Comparing base (a34e4cc) to head (3864851).
⚠️ Report is 2490 commits behind head on main.

Files with missing lines 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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread test/agentchat/test_assistant_agent.py Outdated
Comment thread test/agentchat/test_async_chats.py
Comment thread notebook/agentchat_multi_task_async_chats.ipynb

@qingyun-wu qingyun-wu left a comment

Copy link
Copy Markdown
Contributor

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
@randombet

Copy link
Copy Markdown
Contributor 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 <qingyun0327@gmail.com>
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