Поделиться через


DiskBasedReportingConfiguration.Create Method

Definition

Creates a ReportingConfiguration that persists ScenarioRunResults to disk and also uses the disk to cache AI responses.

public static Microsoft.Extensions.AI.Evaluation.Reporting.ReportingConfiguration Create(string storageRootPath, System.Collections.Generic.IEnumerable<Microsoft.Extensions.AI.Evaluation.IEvaluator> evaluators, Microsoft.Extensions.AI.Evaluation.ChatConfiguration? chatConfiguration = default, bool enableResponseCaching = true, System.Collections.Generic.IEnumerable<string>? cachingKeys = default, string executionName = "Default");
static member Create : string * seq<Microsoft.Extensions.AI.Evaluation.IEvaluator> * Microsoft.Extensions.AI.Evaluation.ChatConfiguration * bool * seq<string> * string -> Microsoft.Extensions.AI.Evaluation.Reporting.ReportingConfiguration
Public Shared Function Create (storageRootPath As String, evaluators As IEnumerable(Of IEvaluator), 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

storageRootPath
String

The path to a directory on disk 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.

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 disk and also uses the disk to cache AI responses.

Applies to