Google Action Intents getting multiplied for every language

dialogflow

#3

Hi @rubenaeg,

thanks for your fast reply. I had to change my language model, because I’m not allowed to share it as it is. But I checked with this one and I have the same outcome.

de-DE.json

{
	"invocation": "dinge finden",
	"intents": [
		{
			"name": "SetAttributeIntent",
			"phrases": [
				"Im {room} ist {attribute}",
				"Im {room} sind {attribute} und {attributetwo}",
				"Hier hat es {attribute}",
				"Hier gibt es {attribute}",
				"Hier ist {attribute}",
				"Hier sind {attribute}"
			],
			"inputs": [
				{
					"name": "room",
					"type": "roomNames"
				},
				{
					"name": "attribute",
					"type": "attributeNames"
				},
				{
					"name": "attributetwo",
					"type": "attributeNames"
				}
			]
		},
		{
			"name": "GetAttributeIntent",
			"phrases": [
				"Was ist in diesem Raum",
				"Was gibt es in diesem Raum",
				"Was hat es in diesem Raum",
				"Was befindet sich in diesem Raum",
				"Was befindet sich im Raum",
				"Was ist im {room}",
				"Was gibt es im {room}",
				"Was hat es im {room}",
				"Was befindet sich im {room}",
				"Was befindet sich im {room}",
				"Habe ich noch {attribute}",
				"Gibt es noch {attribute}"
			],
			"inputs": [
				{
					"name": "room",
					"type": "roomNames"
				},
				{
					"name": "attribute",
					"type": "attributeNames"
				}
			]
		},
		{
			"name": "FindIntent",
			"phrases": [
				"Ich brauche {attribute}",
				"Wo {attribute} ist",
				"Wo {attribute} sind",
				"Wo ist {attribute}",
				"Wo sind {attribute}",
				"Zeig mir meine {attribute}",
				"Zeig mir die {attribute}",
				"Zeig wo {attribute} ist"
			],
			"inputs": [
				{
					"name": "attribute",
					"type": "attributeNames"
				}
			]
		}
		{
			"name": "HelpIntent",
			"alexa": {
				"name": "AMAZON.HelpIntent"
			},
			"phrases": [
				"Hilfe",
				"Hilf mir",
				"Kannst du mir helfen",
				"Was kann ich machen",
				"Wie funktioniert das",
				"Erklärung",
				"Anleitung",
				"Unterstützung"
			]
		}
	],
	"inputTypes": [
		{
			"name": "roomNames",
			"dialogflow": {
				"automatedExpansion": true
			},
			"values": [
				{
					"value": "Zimmer"
				},
				{
					"value": "Wohnzimmer"
				},
				{
					"value": "Küche"
				},
				{
					"value": "Schlafzimmer"
				},
				{
					"value": "Büro"
				}
			]
		},
		{
			"name": "attributeNames",
			"dialogflow": {
				"automatedExpansion": true
			},
			"values": [
				{
					"value": "Geschirr"
				},
				{
					"value": "Pfannen"
				},
				{
					"value": "Kleider"
				},
				{
					"value": "Jacken"
				},
				{
					"value": "Elektronik"
				}
			]
		}
	],
	"alexa": {
		"interactionModel": {
			"languageModel": {
				"intents": [
					{
						"name": "AMAZON.CancelIntent",
						"samples": [
							"abbrechen",
							"Abbruch"
						]
					},
					{
						"name": "AMAZON.StopIntent",
						"samples": [
							"beenden",
							"anhalten",
							"aufhören",
							"Ende",
							"Schluss"
						]
					}
				]
			}
		}
	},
	"dialogflow": {
		"intents": [
			{
				"name": "Default Fallback Intent",
				"auto": true,
				"webhookUsed": true,
				"fallbackIntent": true
			},
			{
				"name": "Default Welcome Intent",
				"auto": true,
				"webhookUsed": true,
				"events": [
					{
						"name": "WELCOME"
					}
				]
			}
		]
	}
}

en-US.json

{
	"invocation": "find things",
	"intents": [
		{
			"name": "SetAttributeIntent",
			"phrases": [
				"in this room is {attribute}",
				"in this room are {attribute} and {attributetwo}",
				"here are {attribute}",
				"here is {attribute}"
			],
			"inputs": [
				{
					"name": "room",
					"type": "roomDriveNames"
				},
				{
					"name": "attribute",
					"type": "attributeNames"
				},
				{
					"name": "attributetwo",
					"type": "attributeNames"
				}
			]
		},
		{
			"name": "GetAttributeIntent",
			"phrases": [
				"What is in this room",
				"What is inside of this room",
				"What is in the {room}",
				"What is inside of the {room}",
				"Do I have {attribute}",
				"Are there any {attribute}",
				"Is there any {attribute}"
			],
			"inputs": [
				{
					"name": "room",
					"type": "roomDriveNames"
				},
				{
					"name": "attribute",
					"type": "attributeNames"
				}
			]
		},
		{
			"name": "FindIntent",
			"phrases": [
				"I need {attribute}",
				"Where are {attribute}",
				"Where is {attribute}",
				"Give me {attribute}",
				"Show me {attribute}"
			],
			"inputs": [
				{
					"name": "attribute",
					"type": "attributeNames"
				}
			]
		},
		{
			"name": "HelpIntent",
			"alexa": {
				"name": "AMAZON.HelpIntent"
			},
			"phrases": [
				"help",
				"help me",
				"Can you help me",
				"What can i do",
				"How does this work",
				"Explanation",
				"Instruction",
				"Support"
			]
		}
	],
	"inputTypes": [
		{
			"name": "roomNames",
			"dialogflow": {
				"automatedExpansion": true
			},
			"values": [
				{
					"value": "chamber"
				},
				{
					"value": "livingroom"
				},
				{
					"value": "kitchen"
				},
				{
					"value": "bedroom"
				},
				{
					"value": "office"
				}
			]
		},
		{
			"name": "attributeNames",
			"dialogflow": {
				"automatedExpansion": true
			},
			"values": [
				{
					"value": "dishes"
				},
				{
					"value": "pans"
				},
				{
					"value": "dress"
				},
				{
					"value": "jacket"
				},
				{
					"value": "electronics"
				}
			]
		}
	],
	"alexa": {
		"interactionModel": {
			"languageModel": {
				"intents": [
					{
						"name": "AMAZON.CancelIntent",
						"samples": [
							"cancel"
						]
					},
					{
						"name": "AMAZON.StopIntent",
						"samples": [
							"end",
							"stop"
						]
					}
				]
			}
		}
	},
	"dialogflow": {
		"intents": [
			{
				"name": "Default Fallback Intent",
				"auto": true,
				"webhookUsed": true,
				"fallbackIntent": true
			},
			{
				"name": "Default Welcome Intent",
				"auto": true,
				"webhookUsed": true,
				"events": [
					{
						"name": "WELCOME"
					}
				]
			}
		]
	}
}

Every Intent shows up twice. If I’m in the german view one is german and one is empty. After a switch to english, the empty one shows english and the other is now empty. The behavior of the entities is normal. It shows only one Entity and it switches the language.


#4

I can’t seem to reproduce it. How do you deploy your action to the dialogflow console?


#5

I use:

jovo deploy --platform googleAction

and my platforms folder seems also normal. All the intents are only once with the additional files ‘…usersays_de’ and ‘…usersays_en’


#6

Hm, does the same problem occur when you import your action as a .zip file?


#7

@rubenaeg

So I deleted all the intents and entities in my dialogflow console and double checked, if anything is left. It said, there are no intents. In the upload agent of dialogflow I uploaded the dialogflow_agent.zip. (wow, I totally missed first the input field for the word “import” and thought the upload isn’t working)

If I do it this way, all the intents are only once and in both languages. So it seems somehow to upload them twice with the jovo deploy?


#8

Hm, the upload is mostly handled by the GCloud CLI, so I’m not sure if it’s a problem on our end. I’ll have a further look tomorrow, but I’m glad that the .zip upload is working as a workaround!


#9

Hi Ruben,
thanks for your help so far, the .zip workaround helps alot.

It would be very interesting to know, how that happens. The .zip seems fine and I didn’t change anything in dialogflow. So it could be the gcloud cli. I tried to find something about it on google, but I didn’t find anything similar.


#10

Hi is there solution for this problem - I am facing the same issue mentioned by @Simon


#11

Hi @Sreedevi_Rajagopal

For now I’m still working with the .zip workaround, because I don’t want to clean the dialogflow up again.
I’m considering to switch from dialogflow to the new action builder. After a short try, I think it works there.


#12

Cool. Thanks. Then I stick to .zip solution.


#13

Hi @rubenaeg

Did you ever had time to look into this?
Suddenly the upload with the zip file has the same behaviour. If i check in the zip file I have for every intent three files like this:
SetAttributeIntent.json
SetAttributeIntent_usersays_de.json
SetAttributeIntent_usersays_en.json

If I upload this zip to dialogflow, I get every intent twice.
image

The first has all the german utterances and the second seems empty. After I switch the language of dialogflow the first seems empty and the second has all the english utterances in it.

Thank you!


#14

I believe this is occurring as jovo isn’t updating the platform build with UUID for each intent. Therefore, when google does the import, if the UUID doesn’t exist, a new one is created for it.

just compare the jovo built model with the dialoflow exported model and you will see the difference.


Importing dialogflow_agent.zip generates intents with no phrases
#15

Hi @painbank you are right. The jovo generated intents don’t have an id but if I export the ones from google they have an id. In the export I get the expected two different ids:
SetAttributeIntent.json -> id: “7be97d…6fa63b0f”
SetAttrbuteIntent_1.json -> id: “8dab1…ed2e10”

But what is the correct workflow? Shouldn’t I be able to start with the language model in jovo and deploy that? Is it expected to add the intents on both Dialogflow and Alexa, use the “get” command and “build reverse”?


#16

Yes I think using jovo get, copying the id and adding it to the Jovo Model file is the best way to do this right now.

We should think about adding a better way with the v4 Jovo CLI. cc @rubenaeg


#17

I plan to have a separate folder with the exported original, that I can then use Beyond Compare to diff the two folders. That way I maintain the UUID and leverage git so nothing is lost. I am not sure putting it in the model file is a better solution as it is really only useful for google’s tracking. storing into some .hiddenFIle of sorts such that it is related to the model files may be the better choice. That way it doesn’t confuse the model files.


#18

Simon, the first time import to dialogflow is fine. IF jovo generates the same ID everytime, you are good to go. However, that is a LONG process to update the model in Dialogflow and test, so you want to be able to go both ways updating the data. Try maintaining the dialgoflow models in a version control system and you will see the nightmare, where as the jovo model files are fairly clean.

also, unfortunately, expect some differences between how Alexa and Dialogflow work and now you have even more differences in the models, so Jovo can help delineate that. Except Jovo doesn’t have a clean way to show variations between the platforms (That I have seen so far). I think it can work where you have say Intent A for alexa and Intent B for Dialogflow, even though they are the essentially same intents, but the utterances have variances.


#19

Hey guys,

will fix this with the new Jovo CLI v4. I created an issue for you to track here.


#20

@painbank, @jan, @rubenaeg

thanks for your help!


#21

awesome, thank you for submitting this. I was considering doing so.


#22

Closing this as the issue should be resolved now.