CompletionMarkerLoopEvaluator.EvaluateAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Evaluates the loop state after an iteration and decides whether to re-invoke the wrapped agent and what feedback to provide.
public override System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.LoopEvaluation> EvaluateAsync(Microsoft.Agents.AI.LoopContext context, System.Threading.CancellationToken cancellationToken = default);
override this.EvaluateAsync : Microsoft.Agents.AI.LoopContext * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.Agents.AI.LoopEvaluation>
Public Overrides Function EvaluateAsync (context As LoopContext, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of LoopEvaluation)
Parameters
- context
- LoopContext
The per-run LoopContext describing the current loop state.
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests.
Returns
A value task whose result is a LoopEvaluation indicating whether to continue and, if so, the feedback to carry forward to the next iteration.