Conversational Context
A Skill can add context to the Intent Parser to create more natural interaction with Mycroft.
@intent_handler(IntentBuilder().require('PythonPerson').require('Length'))
def handle_length(self, message):
python = message.data.get('PythonPerson')
self.speak('{} is {} cm tall'.format(python, length_dict[python]))
@intent_handler(IntentBuilder().require('PythonPerson').require('WhereFrom'))
def handle_from(self, message):
python = message.data.get('PythonPerson')
self.speak('{} is from {}'.format(python, from_dict[python]))User: How tall is John Cleese?
Mycroft: John Cleese is 196 centimeters
User: Where is John Cleese from?
Mycroft: He's from EnglandUsing context to enable Intents
Last updated
Was this helpful?