Condividi tramite


ReportingConfiguration.CreateScenarioRunAsync Method

Definition

Creates a new ScenarioRun with the specified scenarioName and iterationName.

public System.Threading.Tasks.ValueTask<Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRun> CreateScenarioRunAsync (string scenarioName, string iterationName = "1", System.Collections.Generic.IEnumerable<string>? additionalCachingKeys = default, System.Threading.CancellationToken cancellationToken = default);
member this.CreateScenarioRunAsync : string * string * seq<string> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.Extensions.AI.Evaluation.Reporting.ScenarioRun>
Public Function CreateScenarioRunAsync (scenarioName As String, Optional iterationName As String = "1", Optional additionalCachingKeys As IEnumerable(Of String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of ScenarioRun)

Parameters

scenarioName
String

The ScenarioName.

iterationName
String

The IterationName. Uses default value "1" if omitted.

additionalCachingKeys
IEnumerable<String>

An optional collection of unique strings that should be hashed when generating the cache keys for cached AI responses. See CachingKeys for more information about this concept.

cancellationToken
CancellationToken

A CancellationToken that can cancel the operation.

Returns

A new ScenarioRun with the specified scenarioName and iterationName.

Applies to