[.Net] Support graph group chat by adding workflow and transition.#1761
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dotnet #1761 +/- ##
==========================================
- Coverage 39.35% 39.12% -0.24%
==========================================
Files 57 57
Lines 6093 6173 +80
Branches 1362 1383 +21
==========================================
+ Hits 2398 2415 +17
- Misses 3499 3564 +65
+ Partials 196 194 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
joshkyh
left a comment
There was a problem hiding this comment.
Thanks for the invite to review. I don't code in .net so I might be wrong here, I think the current functionalities only support the provision of Allowed Transitions. I'm not sure if you meant to fully translate the Python functionalities which could be missing here in .net.
- Support the input of Disallowed Transitions.
- Transitions validations and raising warnings where appropriate?
|
Overall, it's not the goal of this PR to fully transfer what python autogen graph chat has to dotnet one. And there'll be a little difference in api design and implementation because of difference in ecosystem and language syntax. |
Why are these changes needed?
This PR enables graph group chat in AutoGen.Net by adding a
WorkflowandTransitionclass.Transition
Transitionrepresents a transit step from one agent to another. To create aTransition, usingTransition.CreateTransitionalso conditionally accepts a lambda function which determines if it's enable or not. This allows workflow to be dynamically adjusted based on conversation. (Inspired by the Workflow in PROSE.Conversations)Workflow
Workflowis essentially a list ofTransition. The next transabled candidates from one agent can be retrieved byTransitToNextAvailableAgentsAsyncAPITo create a workflow
Consume workflow in group chat
The group chat now supports workflow. In
SelectNextSpeakerfunction, the group chat will first retrieve the available candidates based on current agent and work flow, then use admin to intelligently decide the next speaker.To consume a workflow in group chat, simply pass it when creating the group
Example
checkout
Example04_Dynamic_GroupChat_Coding_Taskwhich is accommodated to groupchat with workflowRelated issue number
Resolve #1648
Checks