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

How to get confidence of action in conversation? #27

Closed
AnonymousArthur opened this issue Feb 20, 2017 · 3 comments
Closed

How to get confidence of action in conversation? #27

AnonymousArthur opened this issue Feb 20, 2017 · 3 comments

Comments

@AnonymousArthur
Copy link

Like the confidence value showing in Wit.ai Log tab, I want to response unknow message when the confidence is too low.

@tgallice
Copy link
Owner

If you use the dev-master version you can get the confidence from the step $step->getConfidence(). This feature was implemented here: https://github.com/tgallice/wit-php/pull/24/files
If you have an older version take care to the BC.

@AnonymousArthur
Copy link
Author

AnonymousArthur commented Feb 20, 2017

In the abstract class ActionMapping, I have action interface like this:
abstract public function action($sessionId, $actionName, Context $context, array $entities = []);
It doesn't have $step parameter. So weird.

@AnonymousArthur
Copy link
Author

I see why, composer use 0.3.1 version which doesn't have this feature. I'll reinstall the package. Thank you very much!

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

No branches or pull requests

2 participants