Skip to content

Commit

Permalink
unittests/fallback_service
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Sep 30, 2023
1 parent ead64ab commit 39cd5e0
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 55 deletions.
1 change: 0 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
- name: Install test dependencies
run: |
pip install -r requirements/tests.txt
pip install git+https://github.com/OpenVoiceOS/OVOS-workshop@fallback/no_make_active
pip install ./test/unittests/common_query/ovos_tskill_fakewiki
pip install ./test/end2end/session/skill-ovos-hello-world
pip install ./test/end2end/session/skill-ovos-fallback-unknown
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ jobs:
- name: Install test dependencies
run: |
pip install -r requirements/tests.txt
pip install git+https://github.com/OpenVoiceOS/OVOS-workshop@fallback/no_make_active
pip install ./test/unittests/common_query/ovos_tskill_fakewiki
pip install ./test/end2end/session/skill-ovos-hello-world
pip install ./test/end2end/session/skill-ovos-fallback-unknown
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ovos-plugin-manager<0.1.0, >=0.0.24a9
ovos-config~=0.0,>=0.0.11a13
ovos-lingua-franca>=0.4.7
ovos-backend-client>=0.1.0a12
ovos-workshop<0.1.0, >=0.0.13a5
ovos-workshop<0.1.0, >=0.0.13a6

# provides plugins and classic machine learning framework
ovos-classifiers<0.1.0, >=0.0.0a37
15 changes: 1 addition & 14 deletions test/end2end/session/skill-ovos-fallback-unknown/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,5 @@ class UnknownSkill(FallbackSkill):

@fallback_handler(priority=100)
def handle_fallback(self, message):
utterance = message.data['utterance'].lower()

try:
self.report_metric('failed-intent', {'utterance': utterance})
except Exception:
self.log.exception('Error reporting metric')

for i in ['question', 'who.is', 'why.is']:
if self.voc_match(utterance, i):
self.log.debug('Fallback type: ' + i)
self.speak_dialog(i)
break
else:
self.speak_dialog('unknown')
self.speak_dialog('unknown')
return True

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 39cd5e0

Please sign in to comment.