I’m playing around with a few custom sentences and intents, a couple are working fine where the sentence is simple and requires no slots. But as soon as I add a variable into the sentence, the parser seems unable to deal with it. My voice satellite flashes red (unknown error) and the sentence parser tool in the “Assist” tab of the Developer tools console produces no response. Curiously, an “Unknown Error” is logged in the Javascript console when this happens.
Here’s a simple example to highlight the problem…
from config/custom_sentences/en/test.yaml
language: "en"
intents:
TestIntent:
data:
- sentences:
- "test log"
and in config/intents.yaml
TestIntent:
action:
service: "logbook.log"
data:
name: "TestIntent"
message: "test log"
speech:
text: "Test logged"
As shown above, the code works fine in both the sentences parser and the voice assistant. Parser tool returns;
intent:
name: TestIntent
slots: {}
details: {}
targets: {}
match: true
sentence_template: test log
unmatched_slots: {}
source: custom
file: en/tests.yaml
and the test log is visible in the logbook when called for real via the voice assistant.
However, if I now change the custom sentence like so;
- sentences:
- "test {log}"
with no other changes, the parser tool fails to produce any output at all other than the javascript error in the dev tools, and the voice assistant returns “Unexpected error during intent recognition”. I’ve tried declaring the slot in the intent with required set to either true or false and get the same result.
It feels like I’m missing something really basic here, but I’m struggling to find docs/posts that show what that is.
Thanks in advance for any help.