DelegateLoopEvaluator Class

Definition

A LoopEvaluator that delegates the re-invocation decision and feedback to a user-supplied callback.

public sealed class DelegateLoopEvaluator : Microsoft.Agents.AI.LoopEvaluator
type DelegateLoopEvaluator = class
    inherit LoopEvaluator
Public NotInheritable Class DelegateLoopEvaluator
Inherits LoopEvaluator
Inheritance
DelegateLoopEvaluator

Remarks

This is the most flexible evaluator: the supplied delegate receives the full LoopContext and returns a LoopEvaluation, so it can decide both whether to continue and what feedback (if any) to provide.

Constructors

Name Description
DelegateLoopEvaluator(Func<LoopContext,CancellationToken,ValueTask<LoopEvaluation>>)

Initializes a new instance of the DelegateLoopEvaluator class.

Methods

Name Description
EvaluateAsync(LoopContext, CancellationToken)

Evaluates the loop state after an iteration and decides whether to re-invoke the wrapped agent and what feedback to provide.

Applies to