Skip to content

Intent/Entity registration methods should return the registered object #317

Open
@gdaniel

Description

@gdaniel

IntentRecognitionProvider#registerEntityDefinition and IntentRecognitionProvider#registerIntentDefinition both return void. This is an issue for testing, especially for providers that process the Xatkit intents/entities before registering them. It would be better to return the registered object to be able to test it.

An example use case:
The NLP.js provider gracefully degrades to any entities when a given base entity is not supported by NLP.js. This means that any IntentDefinition with such parameter will be processed and the parameter type will be changed to any. Right now we don't have any way to access this processed IntentDefinition and test it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions