次の方法で共有


AzureStorageReportingConfiguration.Create Method

Definition

Creates a ReportingConfiguration that persists ScenarioRunResults to Azure Storage and also uses the storage to cache AI responses.

public static Microsoft.Extensions.AI.Evaluation.Reporting.ReportingConfiguration Create(Azure.Storage.Files.DataLake.DataLakeDirectoryClient client, System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.Evaluation.IEvaluator> evaluators, TimeSpan? timeToLiveForCacheEntries = default, Microsoft.Extensions.AI.Evaluation.ChatConfiguration? chatConfiguration = default, bool enableResponseCaching = true, System.Collections.Generic.IEnumerable<string>? cachingKeys = default, string executionName = "Default");
static member Create : Azure.Storage.Files.DataLake.DataLakeDirectoryClient * seq<Microsoft.Extensions.AI.Evaluation.IEvaluator> * Nullable<TimeSpan> * Microsoft.Extensions.AI.Evaluation.ChatConfiguration * bool * seq<string> * string -> Microsoft.Extensions.AI.Evaluation.Reporting.ReportingConfiguration
Public Shared Function Create (client As DataLakeDirectoryClient, evaluators As IEnumerable(Of IEvaluator), Optional timeToLiveForCacheEntries As Nullable(Of TimeSpan) = Nothing, Optional chatConfiguration As ChatConfiguration = Nothing, Optional enableResponseCaching As Boolean = true, Optional cachingKeys As IEnumerable(Of String) = Nothing, Optional executionName As String = "Default") As ReportingConfiguration

Parameters

client
DataLakeDirectoryClient

A DataLakeDirectoryClient with access to an Azure Storage container under which the ScenarioRunResults and all cached AI responses should be stored.

evaluators
IEnumerable<IEvaluator>

The set of IEvaluators that should be invoked to evaluate AI responses.

timeToLiveForCacheEntries
Nullable<TimeSpan>

An optional TimeSpan that specifies the maximum amount of time that cached AI responses should survive in the cache before they are considered expired and evicted.

chatConfiguration
ChatConfiguration

A ChatConfiguration that specifies the IChatClient and the IEvaluationTokenCounter that are used by AI-based evaluators included in the returned ReportingConfiguration. Can be omitted if none of the included evaluators are AI-based.

enableResponseCaching
Boolean

true to enable caching of AI responses; false otherwise.

cachingKeys
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.

executionName
String

The name of the current execution. See ExecutionName for more information about this concept. Uses a fixed default value "Default" if omitted.

Returns

A ReportingConfiguration that persists ScenarioRunResults to Azure Storage and also uses Azure Storage to cache AI responses.

Applies to