DelegateLoopEvaluator Class
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.
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
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. |