If you updating an intent which has a follow up intent/intents using the nodejs clients - you will land up with this error.
dialogflow version: (latest)Following these steps will guarantee the quickest resolution possible.
Thanks!
Have you tried the update mask to mask out updates to followup intent?
https://github.com/dialogflow/dialogflow-nodejs-client-v2/blob/10dc26914c09e70fd07f7ccaa818e9076f5de25b/protos/google/cloud/dialogflow/v2beta1/intent.proto#L748
Have confirmed this myself and have submitted a bug report from inside Dialogflow console itself. I suggest that others running into this issue do the same to increase it's visibility.
We are having the same issue. What is the bug report id?
I see forum thread here: https://productforums.google.com/forum/#!msg/dialogflow/0NakkcMnyPg/uF8G9cjaAQAJ
I got this response from the DF support team and I have tested it working. Been meaning to update this thread. Good luck!
Hi,
Thanks for reaching out to Dialogflow Support.
Our engineers are working to fix this issue. At this time, a workaround is to specify root_followup_intent_name in updateMask (and don't pass a value for root_followup_intent_name).
Regards,
Ace
Dialogflow Support Team
Excellent. Thank you for the quick response!
Is there an update to this issue?
Just to clarify updateMask field is a FieldMask.
This is an example of how to use it in order to fix the issue:
const intentsClient = new dialogflow.IntentsClient({
credentials: {
client_email,
private_key,
}
});
intentsClient.updateIntent({
intent,
updateMask: {
paths: ['rootFollowupIntentName'],
},
});
Its seams like updating the intent displayName doesnt work when using the updateMask..
Edit: I found the solution! apparently the updateMask is using "snake_case" for the fields.
You want to define the the fields that you want to update. This seams to work without using the root_followup_intent_name as suggested by DF team. Maybe they fixed it?
intentsClient.updateIntent({
intent,
updateMask: {
paths: ['display_name', 'training_phrases'],
},
});
@omfd are you still running into issues on the latest release of the library?
Looks like @Mag90's code should be the fix here. I'm going to close this issue out, but please let me know if you think that is a mistake and I'll happily re-open 馃槑
Good my people, I know this post has some time but I would like to ask if any of you have created followup with this DialogFlow API, I'm looking for a way to do it.
I think I tried it with the code:
let intent = {
displayName: dataIntent.nameIntent,
trainingPhrases: trainingPhrases,
messages: message
};
let response = await IntentsClient.createIntent( {parent:parent, intent:intent} );
But I can't find a way to create the followup, please help.
Most helpful comment
Its seams like updating the intent displayName doesnt work when using the updateMask..
Edit: I found the solution! apparently the updateMask is using "snake_case" for the fields.
You want to define the the fields that you want to update. This seams to work without using the root_followup_intent_name as suggested by DF team. Maybe they fixed it?