EvaluationResultExtensions.AddOrUpdateChatMetadataInAllMetrics 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.
Adds or updates metadata available as part of the evaluation response
produced by an AI
model, in all EvaluationMetrics contained in the supplied result
.
public static void AddOrUpdateChatMetadataInAllMetrics(this Microsoft.Extensions.AI.Evaluation.EvaluationResult result, Microsoft.Extensions.AI.ChatResponse response, TimeSpan? duration = default);
static member AddOrUpdateChatMetadataInAllMetrics : Microsoft.Extensions.AI.Evaluation.EvaluationResult * Microsoft.Extensions.AI.ChatResponse * Nullable<TimeSpan> -> unit
<Extension()>
Public Sub AddOrUpdateChatMetadataInAllMetrics (result As EvaluationResult, response As ChatResponse, Optional duration As Nullable(Of TimeSpan) = Nothing)
Parameters
- result
- EvaluationResult
The EvaluationResult containing the EvaluationMetrics that are to be altered.
- response
- ChatResponse
The ChatResponse that contains metadata to be added or updated.
An optional duration that represents the amount of time that it took for the AI model to produce the supplied
response
. If supplied, the duration will also be included as part of the added metadata.