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
+3
-2
@@ -20,10 +20,11 @@ public static class HostApplicationBuilderAgentExtensions
|
||||
ChatClientAgent target = new(chatClient, instructions, $"{name}_targetAgent");
|
||||
ChatClientAgent customerService = new(chatClient, "You are a customer service agent. You will handle rude, angry, or upset customer inquiries, asking them to be more calm and polite.", $"{name}_customerServiceAgent");
|
||||
|
||||
return new HandoffOrchestration(OrchestrationHandoffs
|
||||
return Handoffs
|
||||
.StartWith(triage)
|
||||
.Add(triage, target, "Hand off to the target agent for handling normal customer requests.")
|
||||
.Add(triage, customerService, "Hand off to the customer service agent for handling rude customer inquiries."));
|
||||
.Add(triage, customerService, "Hand off to the customer service agent for handling rude customer inquiries.")
|
||||
.Build("PirateWorkflow");
|
||||
});
|
||||
var actorBuilder = builder.AddActorRuntime();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user