Inputs not always read fully


#1

Hi,

I’m working on a Google Assistant bot and I am running into an issue. I have an intent where users can look for certain items, this is the configuration in the en-US.json file:

"intents": [
		{
			"name": "SearchFilterIntent",
			"phrases": [
				"I am looking for {searchItem}",
				"do you sell {searchItem}",
				"show me {searchItem}",
				"Find {searchItem}",
				"Do you have {searchItem}"
			],
			"inputs": [
				{
					"name": "searchItem",
					"type": {
						"dialogflow": "@sys.any"
					}
				}
			]
		}
]

The issue I am running into is that sometimes not the whole input is read; ‘I am looking for black womens jeans’ sometimes returns only ‘black’ but is suppposed to return ‘black womens jeans’. Printing this.$inputs gives me the following values:

{
  searchItem: { name: 'searchItem', value: 'black', key: 'black', id: 'black' },
  'searchItem.original': {
    name: 'searchItem.original',
    value: 'black',
    key: 'black',
    id: 'black'
  },
  'searchItem.original.original': {
    name: 'searchItem.original.original',
    value: undefined,
    key: undefined,
    id: undefined
  }
}

The weird thing is that sometimes this works properly and the whole input is read. If I print this.$inputs, this is the output:

{
  searchItem: {
    name: 'searchItem',
    value: 'black womens jeans',
    key: 'black womens jeans',
    id: 'black womens jeans'
  },
  'searchItem.original': {
    name: 'searchItem.original',
    value: 'black womens jeans',
    key: 'black womens jeans',
    id: 'black womens jeans'
  },
  'searchItem.original.original': {
    name: 'searchItem.original.original',
    value: undefined,
    key: undefined,
    id: undefined
  }
}

How can I fix this? I need it to work more stable, now sometimes it does read the whole input, and sometimes it does not. Is this a problem in my code or does this have to do with an update on Jovo? This problem only occurred this week or so, it used to work fine.

$jovo -v

Jovo CLI Version: 2.2.6

Jovo packages of current project:
  jovo-cli: 2.2.6
  jovo-cli-core: 2.2.4
  jovo-cli-deploy-lambda: 2.2.4
  jovo-cli-platform-alexa: 2.2.6
  jovo-cli-platform-google: 2.2.5
  jovo-cms-i18next: 2.2.9
  jovo-config: 0.1.0
  jovo-core: 2.2.8
  jovo-db-filedb: 2.2.8
  jovo-db-firestore: 2.2.8
  jovo-framework: 2.2.10
  jovo-model: 0.1.4
  jovo-model-alexa: 0.1.4
  jovo-model-dialogflow: 0.1.4
  jovo-platform-dialogflow: 2.2.9
  jovo-platform-googleassistant: 2.2.10
  jovo-plugin-debugger: 2.2.9
  jovo-webhook-connector: 2.2.1


#2

How do the respective request JSONs from Google Assistant/Dialogflow look like? I’m afraid this is rather a speech recognition/NLU problem. If Dialogflow only sends black, there’s not much Jovo can do. If Dialogflow sends black womens jeans and Jovo says it’s black, then it might be a bug.


#3

Thanks for your reply, good suggestion. I think this is a nlu problem, sadly. This is a snippet of the request:

"queryResult": {
    "queryText": "im looking for black womens jeans",
    "parameters": {
      "searchItem": "black"
    }

The weird/annoying thing is that this used to work, maybe Dialogflow and its NLU have been updated, I’ll take a look there, thanks : )


#4

Ah, got it. Yes, that’s unfortunate. You can access the queryText with this.$googleAction.getRawText()