Share via


LuisRecognizer.RecognizeAsync Method

Definition

Overloads

RecognizeAsync(ITurnContext, CancellationToken)

Runs an utterance through a recognizer and returns a generic recognizer result.

RecognizeAsync(ITurnContext, LuisPredictionOptions, CancellationToken)

Runs an utterance through a recognizer and returns a generic recognizer result.

RecognizeAsync(ITurnContext, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)

Return results of the analysis (Suggested actions and intents).

RecognizeAsync(ITurnContext, LuisPredictionOptions, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)

Return results of the analysis (Suggested actions and intents).

RecognizeAsync<T>(ITurnContext, CancellationToken)

Runs an utterance through a recognizer and returns a strongly-typed recognizer result.

RecognizeAsync<T>(ITurnContext, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)

Return results of the analysis (Suggested actions and intents).

RecognizeAsync<T>(ITurnContext, LuisPredictionOptions, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)

Return results of the analysis (Suggested actions and intents).

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(ITurnContext, LuisPredictionOptions, 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.LuisV3.LuisPredictionOptions predictionOptions, System.Threading.CancellationToken cancellationToken);
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.LuisV3.LuisPredictionOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.LuisV3.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.

cancellationToken
CancellationToken

Cancellation token.

Returns

Analysis of utterance.

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(ITurnContext, LuisPredictionOptions, 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.LuisV3.LuisPredictionOptions predictionOptions = default, System.Collections.Generic.Dictionary<string,string> telemetryProperties = default, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.AI.LuisV3.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.LuisV3.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, Optional predictionOptions As LuisPredictionOptions = Nothing, Optional telemetryProperties As Dictionary(Of String, String) = Nothing, 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.

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, 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

Task<T>

Analysis of utterance.

Implements

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

Task<T>

The LUIS results of the analysis of the current message text in the current turn's context activity.

Implements

Applies to

RecognizeAsync<T>(ITurnContext, LuisPredictionOptions, 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.LuisV3.LuisPredictionOptions predictionOptions = default, System.Collections.Generic.Dictionary<string,string> telemetryProperties = default, 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.LuisV3.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.LuisV3.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, Optional predictionOptions As LuisPredictionOptions = Nothing, Optional telemetryProperties As Dictionary(Of String, String) = Nothing, 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.

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

Task<T>

The LUIS results of the analysis of the current message text in the current turn's context activity.

Applies to