Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gdaniel opened this issue Jan 18, 2021 · 0 comments
Open

Comments

@gdaniel
Copy link
Member

gdaniel commented Jan 18, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant