Build an open future with us.

Invest in Mycroft and become a community partner.

Conversational-Context, Document issue?


#1

@KathyReid,
As I continue to develop my kodi-skill I am wading through the conversational-context documents and think I may have discovered an issue with the example documents.
The confusion I have is around the following code…

@intent_handler(IntentBuilder('NoMilkIntent').require("NoKeyword").
                              require('MilkContext').build())
@removes_context('MilkContext')
@adds_context('HoneyContext')
def handle_yes_milk_intent(self, message):
    self.milk = True
    self.speak('all right, any Honey?', expect_response=True)

@intent_handler(IntentBuilder('YesMilkIntent').require("YesKeyword").
                              require('MilkContext').build())
def handle_no_milk_intent(self, message):
    self.speak('What about Honey?', expect_response=True)

The IntentBuilder in the first section is a ‘NoMilkIntent’ and is looking for the required 'NoKeyword" yet the def that follows this is the handle_yes_milk_intent.

Likewise

The IntentBuilder in the second section is a ‘YesMilkIntent’ and is looking for the required 'YesKeyword" yet the def that follows this is the handle_no_milk_intent.

I am assuming this is incorrect and the def should align with the IntentBuilder??


#2

Thanks for reporting this @pcwii - is the issue you’ve flagged the same as this one?

Best, Kathy


#3

It sounds similar, and the issue related to the ticket may be the result of the incorrect placenta of the @adds context


#4

I assume that the this was liked as my autocorrect replaced placement with placenta :roll_eyes: