semantic-kernel
semantic-kernel copied to clipboard
.Net: Agents - What should the default maximum number of turns be for AgentGroupChat?
TerminationStrategy.MaximumIterations
defines the maximum number of turns for agents to take in a chat. This only affects when calling:
public async IAsyncEnumerable<ChatMessageContent> InvokeAsync([EnumeratorCancellation] CancellationToken cancellationToken = default)
and not
public async IAsyncEnumerable<ChatMessageContent> InvokeAsync(Agent agent, [EnumeratorCancellation] CancellationToken cancellationToken = default)
As the second method always only takes a single turn for the given agent, regardless of the SelectionStrategy
or MaximumIterations
.
Current definition is:
- The default
TerminationStrategy
onAgentGroupChatSettings
is limited to a single iteration. - Any
TerminationStrategy
default to99
maximum iterations.