How to keep mic open in DialogFlow - dialogflow-es

I´m using DialogFlow to create a chatbot. I want to keep the mic open along a conversation so the user doesn´t have to press the mic button every time.
Is this possible?
Thanks!

If you are referring to Dialogflow test console ("Try it now" prompt) - it doesn't seems you can.
But I will assume that you are referring to Google Assistant integration.
First of all you will have to end each answer with additional question, eg "Can I help you with anything else?" - this will be verified when you will deploy your bot to production in Actions on Google console. For each intent that you want to keep the microphone listening, you will have to make sure that it has "Set this intent as end of conversation" option disabled.

Related

Not able to add the intent from Dialogflow to Google Assistant

Ok I am using the Dialogflow Essentials and there are several intents are already defined which were integrated with google assistant and these intents works fine,But now I made new intent in Dialogflow and it works fine in try now option but when I tried to integrate it with google assistant (Dialogflow ------> Integrations ------> Google Assistant ------->continue with integration ), I can not see the new intent in the List (pop up with previous intents and their check boxes ). May some one help me to know why the new intent is not visible in the list ?
The following screen shot image shows the corresponding error message
The error message reads:
The maximum number of intents is 10.
You are limited to 10 "deep link" Intents that would be used as part of the Action invocation. These enable you to say things like "Ask Super Action to Turn the lights on". Instead of just "Talk to Super Action" and then, while it is running, asking it to turn the lights on.
You are allowed many more Intents themselves - but just 10 that can be used as part of the invocation phrase.
If this is actually for controlling Smart Home devices, you may wish to look into the Smart Home integration for the Google Assistant instead. This lets people control your devices directly through commands to the Assistant ("Hey Google, Turn on the bedroom lights") instead of having to go through an Action you've written ("Hey Google, Ask Super Home to turn on the bedroom lights"). This method does not involve Dialogflow at all.

It's possible to create one-shoot app with Actions on Google?

I am completely new to the "Actions on Google" world, but following some tutorials (like this) i have already achieved good results.
My test
With Google Assistant and/or Google Home mini send my commands to a personal nodejs online server.
To do this:
i have created a new project on https://console.actions.google.com/
selected conversational option
selected create action / custom intent option
from Dialogflow i have personalized the Default Welcome Intent and created a new Intent with the Fulfillment option set to Enable webhook call for this intent
And obviously, from Dialogflow > Fulfillment, i have enabled the Webhook option (with the url of my nodejs app), and not the Inline editor.
This procedure works, when my app recognizes my custom intent, the answer is sent to my nodejs app online.
My problem
The procedure works, but i always have to do 2 steps before i can perform my action:
1) Hey Google, talk with "nameofmyapp"
2) Say the command
My goal
Execute my command directly without always having to do this 2 steps.
Absolutely! Google calls this "deep linking". With this, you'll be able to do something like
Hey Google, ask nameof myapp to command
See the documentation for details, but in short you'll
Make sure you have an Intent for the command in Dialogflow, with several possible phrases that can be used to trigger it.
These phrases should be what you'd say under "command" in the example above - you'd omit the "to" part.
Go to the Integrations section in Dialogflow, under the Google Assistant integration.
In the Implicit invocation section, select the Intent that you'd like to allow as a deep-linked Intent.
If the command takes action and then should quit, make sure either you have set this in Dialogflow or your fulfillment calls app.close();

All my Dialogflow agents recently stopped responding to messenger Welcome Event without changes being made to the agents at all

Hope you're well.
I've set up a few basic chatbots for Facebook Messenger in December 2018 - using Dialogflow. However, recently they've all stopped responding to the initial "Get Started" button that you press on messenger in order to start communicating with the bot. They all worked fine before, and I haven't made any changes, so I am not sure why all of them have stopped responding all of a sudden. Below is what my Default Welcome intents look like:
Input Contexts: None
Output Contexts: A few based on what Quick Reply the human selects
Events: Dialogflow Welcome, Facebook Messenger Welcome
Training Phrases: "Get Started"
Action and Parameters: No parameters. There is a text-box which has "input.welcome" written in it. However, I am not sure what that means, and I didn't notice it previously.
Responses: a FB Messenger quick reply response. The intent is NOT set as the end of conversation.
Fulfillment: Webhook call for this intent and slot filling are both OFF.
I've tried removing all training phrases, removing the Dialogflow event and just having the FB event. I've also tried removing the "input.welcome" action, but I'm having no success.
All I need is my Chatbot to reply with the default welcome intent when a user presses "Get Started", but I am not able to make it work anymore, even when creating new agents. All help is appreciated.
Many thanks,
-Simeon
I don't know if you have checked to see if you are subscribed to "messaging_postbacks". If not follow the steps below.
Step 1: Go to developers.facebook.com page.
Step 2: Select your app (in this case the chatbot with the issue).
Step 3: Scroll down to the "webhooks" (see the image in the link below).
Step 4: Click on "Edit" and select "messaging_postbacks". (also in second linked image).
Step 5: Save and Test chatbot again.
I hope this helps as the "Get Started" of facebook messager is a postback message. Let me know your results.
webhook setting image
enabling "messaging_postbacks" image

Redirect user to the Default Welcome Intent when he says "cancel" or "exit"

I'm developing a Dialogflow application for Google Assitant. In that, if I say "Cancel" it directly calls the exit_conversation intent where I've specified actions_intent_CANCEL event. So it displays the output specified in that intent and bot exit the conversation.
Instead of exiting the Bot I need to open Default Welcome Intent. Is there any way to do that?
P.S. I'm using Python fulfillment as a backend for this bot.
In short - no, you can't do that.
You're essentially asking that, when the user tries to quit, you don't want to let them quit. From Google's and your users' point of view - that is a pretty unacceptable option.
The CANCEL event handler is fairly limited with what it can do - Google will terminate the conversation, even if you don't specify that the microphone should be closed, but you're given the opportunity to say a final message and offer a link to elsewhere.

How to close mic in google assistant app

I had submitted my app for review, but Google replied with "mic" issue. Google Replied :
During our testing, we found that your app would sometimes leave the mic open for the user without any prompt. Make sure that your app always says something before leaving the mic open for the user, so that the user knows what they can say. This is particularly important when your app is first triggered.
Some Points:
1. app.ask()---leaves the mic opens.
2. app.tell()---app leaves the conversation.
I have also enabled the "toggle" of "Set this intent as end of conversation".
Any suggestions??
My app is one to one i.e. If user ask "my address" then address is shown, If "show me direction to PLACE_NAME" then directions are shown. BUT after it mic opens. How to close it?
-----UPDATED-------
fuction someName(app)
{
//---code-----
app.ask('Alright, your address is '+ user_address);
}
I don't want to use app.tell() as it closes the app.
Some other suggestion for this one to one Q/A conversation.
If you are doing fulfillment through a webhook, then the "end conversation" toggle is ignored in favor of what you are sending from your webhook.
You don't show any code, but as noted:
If you use app.ask() or one of the variants of it, the message will be sent to the user and the microphone will be left open. In this case, you should make sure it is clear what you're expecting from the user - in other words, ask a question or prompt them.
If you use app.tell(), the message will be sent to the user and the microphone will be closed. This will end this conversation.
It sounds like, in your case, you should be using app.tell().

Resources