LuisRecognizer.RecognizeAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RecognizeAsync(DialogContext, Activity, LuisRecognizerOptions, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)
Return results of the analysis (Suggested actions and intents).
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (Microsoft.Bot.Builder.Dialogs.DialogContext dialogContext, Microsoft.Bot.Schema.Activity activity, Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions recognizerOptions, System.Collections.Generic.Dictionary<string,string> telemetryProperties, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Overridable Function RecognizeAsync (dialogContext As DialogContext, activity As Activity, recognizerOptions As LuisRecognizerOptions, telemetryProperties As Dictionary(Of String, String), Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RecognizerResult)
Parameters
- dialogContext
- DialogContext
Context object containing information for a single turn of conversation with a user.
- activity
- Activity
activity to recognize.
- recognizerOptions
- LuisRecognizerOptions
A LuisRecognizerOptions instance to be used by the call. This parameter overrides the default LuisRecognizerOptions passed in the constructor.
- telemetryProperties
- Dictionary<String,String>
Additional properties to be logged to telemetry with the LuisResult event.
- telemetryMetrics
- Dictionary<String,Double>
Additional metrics to be logged to telemetry with the LuisResult event.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The LUIS results of the analysis of the current message text in the current turn's context activity.
Applies to
RecognizeAsync(ITurnContext, LuisRecognizerOptions, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)
Return results of the analysis (Suggested actions and intents).
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions recognizerOptions, System.Collections.Generic.Dictionary<string,string> telemetryProperties, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Overridable Function RecognizeAsync (turnContext As ITurnContext, recognizerOptions As LuisRecognizerOptions, telemetryProperties As Dictionary(Of String, String), Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RecognizerResult)
Parameters
- turnContext
- ITurnContext
Context object containing information for a single turn of conversation with a user.
- recognizerOptions
- LuisRecognizerOptions
A LuisRecognizerOptions instance to be used by the call. This parameter overrides the default LuisRecognizerOptions passed in the constructor.
- telemetryProperties
- Dictionary<String,String>
Additional properties to be logged to telemetry with the LuisResult event.
- telemetryMetrics
- Dictionary<String,Double>
Additional metrics to be logged to telemetry with the LuisResult event.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The LUIS results of the analysis of the current message text in the current turn's context activity.
Applies to
RecognizeAsync(ITurnContext, LuisPredictionOptions, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)
Caution
Method is deprecated, please use RecognizeAsync(ITurnContext turnContext, LuisRecognizerOptions recognizerOptions, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics = null, CancellationToken cancellationToken = default(CancellationToken)).
Return results of the analysis (Suggested actions and intents).
[System.Obsolete("Method is deprecated, please use RecognizeAsync(ITurnContext turnContext, LuisRecognizerOptions recognizerOptions, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics = null, CancellationToken cancellationToken = default(CancellationToken)).")]
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Builder.AI.Luis.LuisPredictionOptions predictionOptions, System.Collections.Generic.Dictionary<string,string> telemetryProperties, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("Method is deprecated, please use RecognizeAsync(ITurnContext turnContext, LuisRecognizerOptions recognizerOptions, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics = null, CancellationToken cancellationToken = default(CancellationToken)).")>]
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisPredictionOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisPredictionOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Overridable Function RecognizeAsync (turnContext As ITurnContext, predictionOptions As LuisPredictionOptions, telemetryProperties As Dictionary(Of String, String), Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RecognizerResult)
Parameters
- turnContext
- ITurnContext
Context object containing information for a single turn of conversation with a user.
- predictionOptions
- LuisPredictionOptions
A LuisPredictionOptions instance to be used by the call. This parameter gets merged with the default LuisPredictionOptions passed in the constructor. This will call Luis V2 endpoint if passed.
- telemetryProperties
- Dictionary<String,String>
Additional properties to be logged to telemetry with the LuisResult event.
- telemetryMetrics
- Dictionary<String,Double>
Additional metrics to be logged to telemetry with the LuisResult event.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The LUIS results of the analysis of the current message text in the current turn's context activity.
- Attributes
Applies to
RecognizeAsync(DialogContext, Activity, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)
Return results of the analysis (Suggested actions and intents).
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (Microsoft.Bot.Builder.Dialogs.DialogContext dialogContext, Microsoft.Bot.Schema.Activity activity, System.Collections.Generic.Dictionary<string,string> telemetryProperties, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Overridable Function RecognizeAsync (dialogContext As DialogContext, activity As Activity, telemetryProperties As Dictionary(Of String, String), Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RecognizerResult)
Parameters
- dialogContext
- DialogContext
Context object containing information for a single turn of conversation with a user.
- activity
- Activity
activity to recognize.
- telemetryProperties
- Dictionary<String,String>
Additional properties to be logged to telemetry with the LuisResult event.
- telemetryMetrics
- Dictionary<String,Double>
Additional metrics to be logged to telemetry with the LuisResult event.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The LUIS results of the analysis of the current message text in the current turn's context activity.
Applies to
RecognizeAsync(ITurnContext, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)
Return results of the analysis (Suggested actions and intents).
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (Microsoft.Bot.Builder.ITurnContext turnContext, System.Collections.Generic.Dictionary<string,string> telemetryProperties, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Overridable Function RecognizeAsync (turnContext As ITurnContext, telemetryProperties As Dictionary(Of String, String), Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RecognizerResult)
Parameters
- turnContext
- ITurnContext
Context object containing information for a single turn of conversation with a user.
- telemetryProperties
- Dictionary<String,String>
Additional properties to be logged to telemetry with the LuisResult event.
- telemetryMetrics
- Dictionary<String,Double>
Additional metrics to be logged to telemetry with the LuisResult event.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The LUIS results of the analysis of the current message text in the current turn's context activity.
Implements
Applies to
RecognizeAsync(DialogContext, Activity, LuisRecognizerOptions, CancellationToken)
Runs an utterance through a recognizer and returns a generic recognizer result.
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (Microsoft.Bot.Builder.Dialogs.DialogContext dialogContext, Microsoft.Bot.Schema.Activity activity, Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions recognizerOptions, System.Threading.CancellationToken cancellationToken);
abstract member RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Overridable Function RecognizeAsync (dialogContext As DialogContext, activity As Activity, recognizerOptions As LuisRecognizerOptions, cancellationToken As CancellationToken) As Task(Of RecognizerResult)
Parameters
- dialogContext
- DialogContext
dialog context.
- activity
- Activity
activity to recognize.
- recognizerOptions
- LuisRecognizerOptions
A LuisRecognizerOptions instance to be used by the call. This parameter overrides the default LuisRecognizerOptions passed in the constructor.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
Analysis of utterance.
Applies to
RecognizeAsync(String, LuisRecognizerOptions, CancellationToken)
Return results of the analysis (Suggested actions and intents).
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (string utterance, Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions recognizerOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RecognizeAsync : string * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : string * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Overridable Function RecognizeAsync (utterance As String, Optional recognizerOptions As LuisRecognizerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of RecognizerResult)
Parameters
- utterance
- String
utterance to recognize.
- recognizerOptions
- LuisRecognizerOptions
A LuisRecognizerOptions instance to be used by the call. This parameter overrides the default LuisRecognizerOptions passed in the constructor.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The LUIS results of the analysis of the current message text in the current turn's context activity.
Remarks
No telemetry is provided when using this method.
Applies to
RecognizeAsync(ITurnContext, LuisRecognizerOptions, CancellationToken)
Runs an utterance through a recognizer and returns a generic recognizer result.
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions recognizerOptions, System.Threading.CancellationToken cancellationToken);
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Overridable Function RecognizeAsync (turnContext As ITurnContext, recognizerOptions As LuisRecognizerOptions, cancellationToken As CancellationToken) As Task(Of RecognizerResult)
Parameters
- turnContext
- ITurnContext
Turn context.
- recognizerOptions
- LuisRecognizerOptions
A LuisRecognizerOptions instance to be used by the call. This parameter overrides the default LuisRecognizerOptions passed in the constructor.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
Analysis of utterance.
Applies to
RecognizeAsync(ITurnContext, LuisPredictionOptions, CancellationToken)
Caution
Method is deprecated, please use RecognizeAsync(ITurnContext turnContext, LuisRecognizerOptions recognizerOptions, CancellationToken cancellationToken).
Runs an utterance through a recognizer and returns a generic recognizer result.
[System.Obsolete("Method is deprecated, please use RecognizeAsync(ITurnContext turnContext, LuisRecognizerOptions recognizerOptions, CancellationToken cancellationToken).")]
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Builder.AI.Luis.LuisPredictionOptions predictionOptions, System.Threading.CancellationToken cancellationToken);
[<System.Obsolete("Method is deprecated, please use RecognizeAsync(ITurnContext turnContext, LuisRecognizerOptions recognizerOptions, CancellationToken cancellationToken).")>]
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisPredictionOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisPredictionOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Overridable Function RecognizeAsync (turnContext As ITurnContext, predictionOptions As LuisPredictionOptions, cancellationToken As CancellationToken) As Task(Of RecognizerResult)
Parameters
- turnContext
- ITurnContext
Turn context.
- predictionOptions
- LuisPredictionOptions
A LuisPredictionOptions instance to be used by the call. This parameter gets merged with the default LuisPredictionOptions passed in the constructor. This will call Luis V2 endpoint if passed.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
Analysis of utterance.
- Attributes
Applies to
RecognizeAsync(DialogContext, Activity, CancellationToken)
Runs an utterance through a recognizer and returns a generic recognizer result.
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (Microsoft.Bot.Builder.Dialogs.DialogContext dialogContext, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken);
abstract member RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Overridable Function RecognizeAsync (dialogContext As DialogContext, activity As Activity, cancellationToken As CancellationToken) As Task(Of RecognizerResult)
Parameters
- dialogContext
- DialogContext
dialogcontext.
- activity
- Activity
activity.
- cancellationToken
- CancellationToken
cancellationtoken.
Returns
A Task<TResult> representing the result of the asynchronous operation.
Applies to
RecognizeAsync(ITurnContext, CancellationToken)
Runs an utterance through a recognizer and returns a generic recognizer result.
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (Microsoft.Bot.Builder.ITurnContext turnContext, System.Threading.CancellationToken cancellationToken);
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Overridable Function RecognizeAsync (turnContext As ITurnContext, cancellationToken As CancellationToken) As Task(Of RecognizerResult)
Parameters
- turnContext
- ITurnContext
Turn context.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
Analysis of utterance.
Implements
Applies to
RecognizeAsync<T>(DialogContext, Activity, LuisRecognizerOptions, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)
Return results of the analysis (Suggested actions and intents).
public virtual System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.Dialogs.DialogContext dialogContext, Microsoft.Bot.Schema.Activity activity, Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions recognizerOptions, System.Collections.Generic.Dictionary<string,string> telemetryProperties, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default, System.Threading.CancellationToken cancellationToken = default) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
abstract member RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
override this.RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
Public Overridable Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (dialogContext As DialogContext, activity As Activity, recognizerOptions As LuisRecognizerOptions, telemetryProperties As Dictionary(Of String, String), Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)
Type Parameters
- T
The recognition result type.
Parameters
- dialogContext
- DialogContext
Context object containing information for a single turn of conversation with a user.
- activity
- Activity
activity to recognize.
- recognizerOptions
- LuisRecognizerOptions
A LuisRecognizerOptions instance to be used by the call. This parameter overrides the default LuisRecognizerOptions passed in the constructor.
- telemetryProperties
- Dictionary<String,String>
Additional properties to be logged to telemetry with the LuisResult event.
- telemetryMetrics
- Dictionary<String,Double>
Additional metrics to be logged to telemetry with the LuisResult event.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The LUIS results of the analysis of the current message text in the current turn's context activity.
Applies to
RecognizeAsync<T>(ITurnContext, LuisRecognizerOptions, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)
Return results of the analysis (Suggested actions and intents).
public virtual System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions recognizerOptions, System.Collections.Generic.Dictionary<string,string> telemetryProperties, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default, System.Threading.CancellationToken cancellationToken = default) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
Public Overridable Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (turnContext As ITurnContext, recognizerOptions As LuisRecognizerOptions, telemetryProperties As Dictionary(Of String, String), Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)
Type Parameters
- T
The recognition result type.
Parameters
- turnContext
- ITurnContext
Context object containing information for a single turn of conversation with a user.
- recognizerOptions
- LuisRecognizerOptions
A LuisRecognizerOptions instance to be used by the call. This parameter overrides the default LuisRecognizerOptions passed in the constructor.
- telemetryProperties
- Dictionary<String,String>
Additional properties to be logged to telemetry with the LuisResult event.
- telemetryMetrics
- Dictionary<String,Double>
Additional metrics to be logged to telemetry with the LuisResult event.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The LUIS results of the analysis of the current message text in the current turn's context activity.
Applies to
RecognizeAsync<T>(ITurnContext, LuisPredictionOptions, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)
Caution
Method is deprecated, please use RecognizeAsync(ITurnContext turnContext, LuisRecognizerOptions recognizerOptions, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics = null, CancellationToken cancellationToken = default(CancellationToken)).
Return results of the analysis (Suggested actions and intents).
[System.Obsolete("Method is deprecated, please use RecognizeAsync(ITurnContext turnContext, LuisRecognizerOptions recognizerOptions, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics = null, CancellationToken cancellationToken = default(CancellationToken)).")]
public virtual System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Builder.AI.Luis.LuisPredictionOptions predictionOptions, System.Collections.Generic.Dictionary<string,string> telemetryProperties, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default, System.Threading.CancellationToken cancellationToken = default) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
[<System.Obsolete("Method is deprecated, please use RecognizeAsync(ITurnContext turnContext, LuisRecognizerOptions recognizerOptions, Dictionary<string, string> telemetryProperties, Dictionary<string, double> telemetryMetrics = null, CancellationToken cancellationToken = default(CancellationToken)).")>]
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisPredictionOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisPredictionOptions * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
Public Overridable Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (turnContext As ITurnContext, predictionOptions As LuisPredictionOptions, telemetryProperties As Dictionary(Of String, String), Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)
Type Parameters
- T
The recognition result type.
Parameters
- turnContext
- ITurnContext
Context object containing information for a single turn of conversation with a user.
- predictionOptions
- LuisPredictionOptions
A LuisPredictionOptions instance to be used by the call. This parameter gets merged with the default LuisPredictionOptions passed in the constructor. This will use Luis V2 endpoint if passed.
- telemetryProperties
- Dictionary<String,String>
Additional properties to be logged to telemetry with the LuisResult event.
- telemetryMetrics
- Dictionary<String,Double>
Additional metrics to be logged to telemetry with the LuisResult event.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The LUIS results of the analysis of the current message text in the current turn's context activity.
- Attributes
Applies to
RecognizeAsync<T>(DialogContext, Activity, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)
Return results of the analysis (Suggested actions and intents).
public virtual System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.Dialogs.DialogContext dialogContext, Microsoft.Bot.Schema.Activity activity, System.Collections.Generic.Dictionary<string,string> telemetryProperties, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default, System.Threading.CancellationToken cancellationToken = default) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
abstract member RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
override this.RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
Public Overridable Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (dialogContext As DialogContext, activity As Activity, telemetryProperties As Dictionary(Of String, String), Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)
Type Parameters
- T
The recognition result type.
Parameters
- dialogContext
- DialogContext
Context object containing information for a single turn of conversation with a user.
- activity
- Activity
activity to recognize.
- telemetryProperties
- Dictionary<String,String>
Additional properties to be logged to telemetry with the LuisResult event.
- telemetryMetrics
- Dictionary<String,Double>
Additional metrics to be logged to telemetry with the LuisResult event.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The LUIS results of the analysis of the current message text in the current turn's context activity.
Applies to
RecognizeAsync<T>(ITurnContext, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)
Return results of the analysis (Suggested actions and intents).
public virtual System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.ITurnContext turnContext, System.Collections.Generic.Dictionary<string,string> telemetryProperties, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default, System.Threading.CancellationToken cancellationToken = default) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
Public Overridable Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (turnContext As ITurnContext, telemetryProperties As Dictionary(Of String, String), Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)
Type Parameters
- T
The recognition result type.
Parameters
- turnContext
- ITurnContext
Context object containing information for a single turn of conversation with a user.
- telemetryProperties
- Dictionary<String,String>
Additional properties to be logged to telemetry with the LuisResult event.
- telemetryMetrics
- Dictionary<String,Double>
Additional metrics to be logged to telemetry with the LuisResult event.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
The LUIS results of the analysis of the current message text in the current turn's context activity.
Implements
Applies to
RecognizeAsync<T>(ITurnContext, LuisRecognizerOptions, CancellationToken)
Runs an utterance through a recognizer and returns a strongly-typed recognizer result.
public virtual System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions recognizerOptions, System.Threading.CancellationToken cancellationToken) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
Public Overridable Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (turnContext As ITurnContext, recognizerOptions As LuisRecognizerOptions, cancellationToken As CancellationToken) As Task(Of T)
Type Parameters
- T
The recognition result type.
Parameters
- turnContext
- ITurnContext
Turn context.
- recognizerOptions
- LuisRecognizerOptions
A LuisRecognizerOptions instance to be used by the call. This parameter overrides the default LuisRecognizerOptions passed in the constructor.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
Analysis of utterance.
Applies to
RecognizeAsync<T>(ITurnContext, LuisPredictionOptions, CancellationToken)
Caution
Method is deprecated, please use RecognizeAsync<T>(ITurnContext turnContext, LuisRecognizerOptions recognizerOptions, CancellationToken cancellationToken).
Runs an utterance through a recognizer and returns a strongly-typed recognizer result.
[System.Obsolete("Method is deprecated, please use RecognizeAsync<T>(ITurnContext turnContext, LuisRecognizerOptions recognizerOptions, CancellationToken cancellationToken).")]
public virtual System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Builder.AI.Luis.LuisPredictionOptions predictionOptions, System.Threading.CancellationToken cancellationToken) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
[<System.Obsolete("Method is deprecated, please use RecognizeAsync<T>(ITurnContext turnContext, LuisRecognizerOptions recognizerOptions, CancellationToken cancellationToken).")>]
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisPredictionOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.Luis.LuisPredictionOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
Public Overridable Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (turnContext As ITurnContext, predictionOptions As LuisPredictionOptions, cancellationToken As CancellationToken) As Task(Of T)
Type Parameters
- T
The recognition result type.
Parameters
- turnContext
- ITurnContext
Turn context.
- predictionOptions
- LuisPredictionOptions
A LuisPredictionOptions instance to be used by the call. This parameter gets merged with the default LuisPredictionOptions passed in the constructor. This will call Luis V2 endpoint if passed.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
Analysis of utterance.
- Attributes
Applies to
RecognizeAsync<T>(DialogContext, Activity, CancellationToken)
Runs an utterance through a recognizer and returns a strongly-typed recognizer result.
public virtual System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.Dialogs.DialogContext dialogContext, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
abstract member RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
override this.RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
Public Overridable Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (dialogContext As DialogContext, activity As Activity, cancellationToken As CancellationToken) As Task(Of T)
Type Parameters
- T
type of result.
Parameters
- dialogContext
- DialogContext
dialogContext.
- activity
- Activity
activity.
- cancellationToken
- CancellationToken
cancellationToken.
Returns
A Task<TResult> representing the result of the asynchronous operation.
Applies to
RecognizeAsync<T>(ITurnContext, CancellationToken)
Runs an utterance through a recognizer and returns a strongly-typed recognizer result.
public virtual System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.ITurnContext turnContext, System.Threading.CancellationToken cancellationToken) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
Public Overridable Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (turnContext As ITurnContext, cancellationToken As CancellationToken) As Task(Of T)
Type Parameters
- T
The recognition result type.
Parameters
- turnContext
- ITurnContext
Turn context.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
Analysis of utterance.
Implements
Applies to
RecognizeAsync<T>(DialogContext, Activity, LuisRecognizerOptions, CancellationToken)
Runs an utterance through a recognizer and returns a strongly-typed recognizer result.
public virtual System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.Dialogs.DialogContext dialogContext, Microsoft.Bot.Schema.Activity activity, Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions recognizerOptions, System.Threading.CancellationToken cancellationToken) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
abstract member RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
override this.RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * Microsoft.Bot.Builder.AI.Luis.LuisRecognizerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
Public Overridable Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (dialogContext As DialogContext, activity As Activity, recognizerOptions As LuisRecognizerOptions, cancellationToken As CancellationToken) As Task(Of T)
Type Parameters
- T
The recognition result type.
Parameters
- dialogContext
- DialogContext
dialog context.
- activity
- Activity
activity to recognize.
- recognizerOptions
- LuisRecognizerOptions
A LuisRecognizerOptions instance to be used by the call. This parameter overrides the default LuisRecognizerOptions passed in the constructor.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
Analysis of utterance.