Edit

Share via


MockLuisRecognizer class

Test class for creating cached LUIS responses for testing.

Extends

Recognizer

Constructors

MockLuisRecognizer(LuisAdaptiveRecognizer, string, string)

Initializes a new instance of the MockLuisRecognizer class.

Inherited Properties

id

Recognizers unique ID.

telemetryClient

The telemetry client for logging events. Default this to the NullTelemetryClient, which does nothing.

Methods

recognize(DialogContext, Activity, Record<string, string>, Record<string, number>)

Inherited Methods

configure(Record<string, unknown>)

Fluent method for configuring the object.

getConverter(string)

Constructor Details

MockLuisRecognizer(LuisAdaptiveRecognizer, string, string)

Initializes a new instance of the MockLuisRecognizer class.

new MockLuisRecognizer(recognizer: LuisAdaptiveRecognizer, resourceDir: string, name: string)

Parameters

recognizer

LuisAdaptiveRecognizer

LUIS recognizer definition.

resourceDir

string

Where the settings file generated by lubuild is found.

name

string

Name of the LUIS model

Inherited Property Details

id

Recognizers unique ID.

id: string

Property Value

string

Inherited From Recognizer.id

telemetryClient

The telemetry client for logging events. Default this to the NullTelemetryClient, which does nothing.

telemetryClient: BotTelemetryClient

Property Value

BotTelemetryClient

Inherited From Recognizer.telemetryClient

Method Details

recognize(DialogContext, Activity, Record<string, string>, Record<string, number>)

function recognize(dialogContext: DialogContext, activity: Activity, telemetryProperties?: Record<string, string>, telemetryMetrics?: Record<string, number>): Promise<RecognizerResult>

Parameters

dialogContext

DialogContext

Dialog context.

activity

Activity

Activity to recognize.

telemetryProperties

Record<string, string>

Additional properties to be logged to telemetry with the LuisResult event.

telemetryMetrics

Record<string, number>

Additional metrics to be logged to telemetry with the LuisResult event.

Returns

Promise<RecognizerResult>

Analysis of utterance.

Inherited Method Details

configure(Record<string, unknown>)

Fluent method for configuring the object.

function configure(config: Record<string, unknown>): this

Parameters

config

Record<string, unknown>

Configuration settings to apply.

Returns

this

The Configurable after the operation is complete.

Inherited From Configurable.configure

getConverter(string)

function getConverter(_property: string): Converter | ConverterFactory

Parameters

_property

string

The key of the conditional selector configuration.

Returns

Converter | ConverterFactory

The converter for the selector configuration.

Inherited From Configurable.getConverter