I added a quick check to see if the NLP returns an empty string to the answer field. Instead return 'None' when this occurs.
Fixes #198
Type of change (pick-one)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
How Has This Been Tested?
I ran the following request, which had initially contained an empty answer:
curl --location --request POST 'localhost:8080/ask' --header 'Content-Type: application/json' --data-raw '{ "question": "How would I see Dr. Ventura now?" }'
Now, it returns:
{
"answer": "I'm sorry, I understand your question but was unable to find an answer. Please try another question.",
"session": "SOME_NEW_TOKEN"
}
Checklist (check-all-before-merge)
formatting help: - [x] means "checked' and - [ ] means "unchecked"
What's New?
I added a quick check to see if the NLP returns an empty string to the answer field. Instead return 'None' when this occurs.
Fixes #198
Type of change (pick-one)
How Has This Been Tested?
I ran the following request, which had initially contained an empty answer:
Now, it returns:
Checklist (check-all-before-merge)
formatting help:
- [x]
means "checked' and- [ ]
means "unchecked"[x] I documented my code according to the Google Python Style Guide
[ ] I ran
./build_docs.sh
and the docs look fine[ ] I ran
./type_check.sh
and got no errors[x] I ran
./format.sh
because it automatically cleans my code for me 😄[ ] I ran
./lint.sh
to check for what "format" missed[ ] I added my tests to the
/tests
directory[ ] I ran
./run_tests.sh
and all the tests pass