Delete an element from training_phrases object of dialogflow api - dialogflow-es

How to delete a training phrase element from the object “training_phrases” of dialogflow api?

Related

How to use Class Token in DialogFLow

I'm using for the first time DialogFlow and I'm trying to use Class Tokens. How can I use them? In the Inline Editor of the Fulfillment? Thank you in advance.
In order to use class tokens you must add your token in phrases array under the speechContexts parameter in the recognitionConfig which is passed as input to the detectIntent or detectStreamingIntent Function in your webhook code.
Checkout these links for reference.
https://cloud.google.com/speech-to-text/docs/speech-adaptation#class_tokens
https://cloud.google.com/dialogflow/es/docs/speech-adaptation
https://cloud.google.com/dialogflow/es/docs/how/detect-intent-stream

Google Dialogflow is not detecting all the entities in the user entered text

We are trying to implement chatbot using Google dialog flow. Created 2 intents (movies & purchases) as below.
And created 2 Entities (Movies & Purchases as below).
When I tested it with 'I cannot watch my purchased movie', it is detecting 'movies' intent and it is detecting only one entity 'movies'. It is not detecting 'purchases' entity even though the word 'purchased' is in the user entered text.
Can any one please let me know how to make sure that dialog flow detects all the entities present in the user entered text and also why it is detecting 'movies' intent as 'purchases' intent also have the training phrases that can match the user entered text.
In the image of your conversation in Dialogflow it shows that Dialogflow matched the user phrase to the movie intent. In your movie intent setup you have setup only 1 parameter,
movies. Dialogflow will only recognize one entity because you have setup the intent to only look for 1 entity.
If you want the movie intent to be able to recognize both entities you should add a phrase that contains both a movies and a purchase intent and make sure both entities are available in the Actions and Parameters section of your intent.
Here is a quick example that detects a gender and an age category entity.

Dialogflow Intent won't pick up Carousel Card response

I'm currently testing dialogflow to get to know it a bit more.
Within Google Dialogflow, I have created 2 Carousel cards, named "City" and "Country". The item titles also have "City" and "Country".
I also created 2 Intents named "_City" and _Country. Intent "_City" contains the name "City" as a Training phrases (without any Action and Parameter). Intent "_Country" contains the "Country" as a Training phrases.
If I test the flow on Google Assistant (on actions.google.com or the Google Assistant app on my smart devices), I touched the City Carousel Card and it responds with "City".
I expected that the Intent "_City" with pick this up, but instead, Google Assistant response with "I do not understand". The same with the "Country" card.
Does somebody know how an Intent will pick up the response of a Carousel card?
If I use a basic card and add some Suggestion Chips, Google Assistant will pick up the response and the Intent will handle it correct.
A carousel response behaves slightly different from other responses. It is not going to be the same as text. Rather, you need to handle the actions_intent_OPTION event in Dialogflow and pass that to your fulfillment.
app.intent('Carousel - OPTION', (conv, params, option) => {
const SELECTED_ITEM_RESPONSES = {
'SELECTION_KEY_ONE': 'You selected the first item',
'SELECTION_KEY_GOOGLE_HOME': 'You selected the Google Home!',
'SELECTION_KEY_GOOGLE_PIXEL': 'You selected the Google Pixel!',
};
conv.ask(SELECTED_ITEM_RESPONSES[option]);
conv.ask('Which response would you like to see next?');
});

Dialogflow navigate through conversation using fulfillment

I have an intent that is triggering the fulfillment logic which based on the extracted entities and intent name should decide which text and which custom payload should be returned to the client. Example:
intent A(to fulfillment): I want to buy some eggs(entity)
fulfillment:
if we_have_eggs_in_store
go to intent A
else
go to intent B
intent A: How many eggs you want?
intent B: We currently don't have any eggs in our store...
constraints:
1. I don't want to store the response text in the fulfillment
2. I want to pass custom payload back to the client
Is this possible to achieve with the Dialogflow?

Dialogflow Intent not matched on clicking from Google Assistant's List View Key, but works when written in Plain Text

I have a certain Intent set-up on Google Dialogflow which matches employee leave-status by a very specific single-word keyword. For example, if the user types "Submitted", it shows that the description stating leave has been in submitted status.
However, when the exact same keyword is selected from a List View of Google Assistant, dialogflow is not able to match the intent.
How is it possible that the same keyword does not match Intent when clicked from a List View, but the same query works in Plain Text?
When a list item(or carousel card) is tapped, it generates an event which will hit your webhook, unlike the simple text message.
1st way (if your webhook handling the response)
So you need to handle it in your code.
Generally, it should have intent as actions_intent_OPTION. from there you need to segregate it.
2nd way (if your code is not handling the response)
In this way, your intent must be able to handle actions_intent_OPTION event generated by the list(or carousel).
for that, your intent need to add the event as shown in below image (Basically it tells the dialogflow that whenever the actions_intent_OPTION events triggered, this intent it capable to handle it, but currently in your case no intent matches the description and it's going to Default Fallback Intent)
So whenever the list item tapped it can handle the flow.
For more refer this documentation.

Resources