Default intent filter in sentences.ini

To disable intents in sentences.ini by default, please add the following addition to https://github.com/rhasspy/rhasspy-nlu-hermes/blob/master/rhasspynlu_hermes/init.py#L87.

           def intent_filter(intent_name: str) -> bool:
               """Filter out intents."""
               if not query.intent_filter and "_disabled" in intent_name:
                   return False
               if query.intent_filter and "_disabled" in intent_name and not intent_name in query.intent_filter:
                   return False
               if query.intent_filter:
                   return intent_name in query.intent_filter
               return True

By inserting

               if not query.intent_filter and "_disabled" in intent_name:
                   return False
               if query.intent_filter and "_disabled" in intent_name and not intent_name in query.intent_filter:
                   return False

it is then possible to disable [IntentName_disabled] by default.
The intent is activated when it is included in “hermes/dialogueManager/configure->intents” and/or in “hermes/dialogueManager/continueSession->intentFilter”.

Greetings, Jens

1 Like

Due to the good news that the development of Rhasspy is going on and a new main version is in prospect, I would like to pick up this thread and repeat it in this context about the extension of the dialog management.
It involves calling bei continueSession, an empty intent [response], and a $cities slot from [citys_disabled] intent.
The slot option is not in the Rhasspy reference but is part of the Hermes reference. Thank you in advance for reading.
Greetings, Jens