QnAMaker.FillQnAEventAsync 方法

定义

为遥测填充 QnaMessage 事件的事件属性和指标。 调用 QnA GetAnswers 方法时,会记录这些属性。

protected System.Threading.Tasks.Task<(System.Collections.Generic.Dictionary<string,string> Properties, System.Collections.Generic.Dictionary<string,double> Metrics)> FillQnAEventAsync (Microsoft.Bot.Builder.AI.QnA.QueryResult[] queryResults, Microsoft.Bot.Builder.ITurnContext turnContext, System.Collections.Generic.Dictionary<string,string> telemetryProperties = default, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default, System.Threading.CancellationToken cancellationToken = default);
member this.FillQnAEventAsync : Microsoft.Bot.Builder.AI.QnA.QueryResult[] * Microsoft.Bot.Builder.ITurnContext * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<ValueTuple<System.Collections.Generic.Dictionary<string, string>, System.Collections.Generic.Dictionary<string, double>>>
Protected Function FillQnAEventAsync (queryResults As QueryResult(), turnContext As ITurnContext, Optional telemetryProperties As Dictionary(Of String, String) = Nothing, Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ValueTuple(Of Dictionary(Of String, String), Dictionary(Of String, Double)))

参数

queryResults
QueryResult[]

QnA 服务结果。

turnContext
ITurnContext

包含与用户进行单轮对话的信息的上下文对象。

telemetryProperties
Dictionary<String,String>

要为事件添加/重写的属性。

telemetryMetrics
Dictionary<String,Double>

要为事件添加/替代的指标。

cancellationToken
CancellationToken

可由其他对象或线程用以接收取消通知的取消标记。

返回

将发送到 QnAMessage 事件的 IBotTelemetryClient.TrackEvent 方法的属性和指标元组。 属性和指标返回使用从 GetAnswersAsync 方法传递的任何属性记录的标准属性。

适用于