QnAMaker.FillQnAEventAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
填入遙測之 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
取消語彙基元,可由其他物件或執行緒用來接收取消通知。
傳回
屬性和計量的 Tuple,將會傳送至 QnAMessage 事件的 IBotTelemetryClient.TrackEvent 方法。 屬性和計量會傳回從 GetAnswersAsync 方法傳遞的任何屬性所記錄的標準屬性。