You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromovos_utils.fakebusimportFakeBus, Messagefromovos_workshop.decoratorsimportintent_handler, conversational_intentfromovos_workshop.skillsimportOVOSSkillclassDogFactsSkill(OVOSSkill):
@intent_handler("dog_facts.intent")defhandle_intent(self, message):
fact="Dogs sense of smell is estimated to be 100,000 times more sensitive than humans"self.speak(fact)
@conversational_intent("another_one.intent")defhandle_followup_question(self, message):
fact2="Dogs have a unique nose print, making each one distinct and identifiable."self.speak(fact2)
if__name__=="__main__":
s=DogFactsSkill(skill_id="test", bus=FakeBus())
r=s.converse_matchers["en-us"].calc_intent("another one")
print(r) # {'entities': {}, 'conf': 1, 'name': 'test.converse:another_one.intent'}m=Message(f"test.converse.request", {"utterances": ["one more"]})
defhandle_speak(m):
print(m.data)
# {'utterance': 'Dogs have a unique nose print, making each one distinct and identifiable.',# 'expect_response': False, 'meta': {'skill': 'test'}, 'lang': 'en-us'}s.bus.on("speak", handle_speak)
s.bus.emit(m)
The text was updated successfully, but these errors were encountered:
tests for #12
The text was updated successfully, but these errors were encountered: