Share via


ChatConversationEvaluator.PerformEvaluationAsync Method

Definition

Invokes the supplied ChatClient with the supplied evaluationMessages to perform the evaluation, and includes the results as one or more EvaluationMetrics in the supplied result.

protected:
 abstract System::Threading::Tasks::ValueTask PerformEvaluationAsync(Microsoft::Extensions::AI::Evaluation::ChatConfiguration ^ chatConfiguration, System::Collections::Generic::IList<Microsoft::Extensions::AI::ChatMessage ^> ^ evaluationMessages, Microsoft::Extensions::AI::Evaluation::EvaluationResult ^ result, System::Threading::CancellationToken cancellationToken);
protected abstract System.Threading.Tasks.ValueTask PerformEvaluationAsync(Microsoft.Extensions.AI.Evaluation.ChatConfiguration chatConfiguration, System.Collections.Generic.IList<Microsoft.Extensions.AI.ChatMessage> evaluationMessages, Microsoft.Extensions.AI.Evaluation.EvaluationResult result, System.Threading.CancellationToken cancellationToken);
abstract member PerformEvaluationAsync : Microsoft.Extensions.AI.Evaluation.ChatConfiguration * System.Collections.Generic.IList<Microsoft.Extensions.AI.ChatMessage> * Microsoft.Extensions.AI.Evaluation.EvaluationResult * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Protected MustOverride Function PerformEvaluationAsync (chatConfiguration As ChatConfiguration, evaluationMessages As IList(Of ChatMessage), result As EvaluationResult, cancellationToken As CancellationToken) As ValueTask

Parameters

chatConfiguration
ChatConfiguration

A ChatConfiguration that specifies the IChatClient and the IEvaluationTokenCounter that this IEvaluator uses to perform the evaluation.

evaluationMessages
IList<ChatMessage>

The set of messages that are to be sent to the supplied ChatClient to perform the evaluation.

result
EvaluationResult

An EvaluationResult that includes a collection of EvaluationMetrics that are supported by this IEvaluator.

cancellationToken
CancellationToken

A CancellationToken that can cancel the operation.

Returns

A ValueTask that represents the asynchronous operation.

Applies to