MostSpecificSelector class
Select the most specific true rule implementation of TriggerSelector.
- Extends
Properties
$kind | |
selector |
Methods
initialize(On |
Initializes the selector with the set of rules. |
select(Action |
Selects the best rule to execute. |
Inherited Methods
configure(Record<string, unknown>) | Fluent method for configuring the object. |
get |
Property Details
$kind
static $kind: string
Property Value
string
selector
Method Details
initialize(OnCondition[], boolean)
Initializes the selector with the set of rules.
function initialize(conditionals: OnCondition[], _evaluate: boolean)
Parameters
- conditionals
Possible rules to match.
- _evaluate
-
boolean
True by default if rules should be evaluated on select.
select(ActionContext)
Selects the best rule to execute.
function select(context: ActionContext): Promise<OnCondition[]>
Parameters
- context
- ActionContext
The context for the current turn of conversation.
Returns
Promise<OnCondition[]>
The best rule in original list to execute.
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