mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Clean up handoff orchestration creation (#235)
- Remove Dictionary-derived types - Add an optional name to orchestrations - Make Handoffs based purely on AIAgent instances rather than separately provided names
This commit is contained in:
committed by
GitHub
Unverified
parent
a72245287f
commit
233c557173
@@ -56,11 +56,12 @@ public class HandoffOrchestration_Intro(ITestOutputHelper output) : Orchestratio
|
||||
responses.Enqueue("Order ID 321");
|
||||
responses.Enqueue("Broken item");
|
||||
responses.Enqueue("No, bye");
|
||||
|
||||
// Define the orchestration
|
||||
HandoffOrchestration orchestration =
|
||||
new(OrchestrationHandoffs
|
||||
new(Handoffs
|
||||
.StartWith(triageAgent)
|
||||
.Add(triageAgent, statusAgent, returnAgent, refundAgent)
|
||||
.Add(triageAgent, [statusAgent, returnAgent, refundAgent])
|
||||
.Add(statusAgent, triageAgent, "Transfer to this agent if the issue is not status related")
|
||||
.Add(returnAgent, triageAgent, "Transfer to this agent if the issue is not return related")
|
||||
.Add(refundAgent, triageAgent, "Transfer to this agent if the issue is not refund related"))
|
||||
|
||||
+2
-2
@@ -46,9 +46,9 @@ public class HandoffOrchestration_With_StructuredInput(ITestOutputHelper output)
|
||||
|
||||
// Define the orchestration
|
||||
HandoffOrchestration orchestration =
|
||||
new(OrchestrationHandoffs
|
||||
new(Handoffs
|
||||
.StartWith(triageAgent)
|
||||
.Add(triageAgent, dotnetAgent, pythonAgent))
|
||||
.Add(triageAgent, [dotnetAgent, pythonAgent]))
|
||||
{
|
||||
LoggerFactory = this.LoggerFactory,
|
||||
ResponseCallback = monitor.ResponseCallback,
|
||||
|
||||
Reference in New Issue
Block a user