Class RoundRobinOrchestrator
Return the next agent in a round-robin fashion.
If the last message is from one of the candidates, the next agent will be the next candidate in the list.
Otherwise, the first agent in Candidates will be returned.
public class RoundRobinOrchestrator : IOrchestrator
- Inheritance
-
RoundRobinOrchestrator
- Implements
- Inherited Members
Methods
GetNextSpeakerAsync(OrchestrationContext, CancellationToken)
Return the next agent as the next speaker. return null if no agent is selected.
public Task<IAgent?> GetNextSpeakerAsync(OrchestrationContext context, CancellationToken cancellationToken = default)
Parameters
context
OrchestrationContextorchestration context, such as candidate agents and chat history.
cancellationToken
CancellationTokencancellation token