Python:
class DiYoga(Skill):
def __init__(self):
super().__init__()
self.UResponder: UniqueResponder = UniqueResponder()
self.UResponder.addResponse("frog pose")
self.UResponder.addResponse("butterfly pose")
self.chat: EventChat = EventChat(self.UResponder, "yoga me")
self.chat.add_key_value("elaborate frog pose","place feet wide and lower hips into a squate. then lower your hands to the floor between your legs")
self.chat.add_key_value("elaborate butterfly pose","sit up straight and bend your legs so that your bottom of your feet touch")
def input(self, ear: str, skin: str, eye: str):
if len(ear) == 0:
return
n = self.chat.response(ear)
if len(n) >0:
self.setSimpleAlg(n)