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

Issues/114 #128

Merged
merged 4 commits into from
Apr 26, 2021
Merged

Issues/114 #128

merged 4 commits into from
Apr 26, 2021

Conversation

clusterfudge
Copy link
Collaborator

@clusterfudge clusterfudge commented Apr 26, 2021

Fixes #114

Also uncovered a bug where a method parameter ( Intent.validate_with_tags(self, tags, confidence) ) was being overridden internally. The fix includes better variable names for confidence and parser_weight as appropriate, and does not break any existing tests.

I've added an explicit test that fails in the example provided in #114 , and that test passes with this change.

CLA Signed

Copy link
Collaborator

@forslund forslund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks good, and test proves it.

tag_confidence is ignored in the optional case, if this is intended I think it's better to store to a _ to indicate that that part of the response is ignored.

adapt/intent.py Show resolved Hide resolved
@clusterfudge
Copy link
Collaborator Author

@forslund PTAL again. thanks!

Copy link
Collaborator

@forslund forslund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes more sense now. Approved!

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

Successfully merging this pull request may close these issues.

ZeroDivisionError in determine_intent when tags are empty
2 participants