Conversational Context

I’ve tried looking through the docs and googling, but I can’t find anything about this topic. Is there a way for Rhasspy to hold context similar to Conversational Context outlined in the Mycroft docs?

This would range from something like:
Me: “Hey Rhasspy, How tall is John Cleese”
Rhasspy: “He is 196 centimeters”
Me: “Where’s he from?” (Notice no need for wake word again)
Rhasspy: “He’s from England”

Another example would be:
Me: “Hey Rhasspy, What’s the weather like today?”
Rhasspy: “it’s 70 degrees with a 10% chance of rain. Should I read the 3 day forecast?” (notice it assumes my location if none given)
Me: “Yes” or “No”

Bonus question: how would I go about having it assume my location if I didn’t provide one in my sentence?

Thanks all for any help!

There’s nothing currently in the Rhasspy dialog manager to manage context discussions like your examples. Having said that, you do have the raw building blocks to build your own context manager with what Rhasspy already provides. You could, for any given intent, reply with a question and continue the session to receive another response (and limit the successive intent) if you so wished.

Equally there’s nothing stopping you logging sessions within your own code which could track the relationship between a previous request and the current request and determine correlation.

Really it depends on your programming ability and what you want to achieve. Yes, contextual conversion is possible with Rhasspy, but no, it doesn’t track it all for you as yet.

As for your second question regarding location, do you mean within your home, or geographically? I have answers but without your train of thought I might be barking up the wrong tree :sweat_smile:

Edit - I realise now you were asking in relation to a weather intent. How do/would you handle intents? You could set your location within the intent handler which would be used as default if a location wasn’t provided in the sentence. If you were only ever to use Rhasspy within your home I don’t see the issue, and your sentence could account for an optional location so you could ask for weather information for other locations if you so wished.