I want to change the retryprompt at runtime in promptoptions? The requirement is change the wording at runtime based on input given by user. Is it possible. Is there any way to send image in the dialog. I want to send image instead of text in promptoptions?
Thanks in advance.
You can refer the virtual assistant sample in which the same is implemented. The DefaultAdapter in the Virtual Assistant template provides a set of Middlewares out of the box including the following:
Show Typing Middleware - Sends typing indicators from the bot.
https://microsoft.github.io/botframework-solutions/virtual-assistant/handbook/activity-flow/
Related
So I was using Gmail Google Action on my Assistant device and One thing that I found particularly intriguing was that when a user has given its message and email, after that assistant gives options for change or adding the message. That means on selecting those options, assistant will change the value of message entity or edit it as per user command, without re-enabling the whole intent.
My question is how can I implement this functionality in my Google Action. Is there any particular function made by Google that I can use or do I have to create one from scratch ?
Gmail's integration is a bit different than the way a third-party developer would do it, but you can save user input from the current session and modify it later on in your conversation. In your Action, this wouldn't be just one intent, but a few that would handle the work of modifying some session data and finally using that data to complete the user's original action.
I've set up a simple QnA bot which is linked to a QnA service. Within the QnA service I have set up some questions which have follow up prompts(Dependents) e.g. how do I get to a campus, via bus, train etc. see image in link, within the Qna maker testing function you can just click a button called enable mutli-turn which provides functional buttons to inform you of what can/should be asked next via the dependents of the answer See image in link.
However when used within a channel/in the emulator nothing of the like appears see image, which is a bit odd. And obviously I want to implement such functionality in to the bot as it makes life so much easier for the users.
I am new to the whole bot thing(I started last month), so I have a browsed the internet to see what I could find but I could not see anything out side of writing the questions within the bot it self, see Microsofts documentation, which makes using QnA maker pretty much pointless.
What I think I need to do is intercept the message from QnA maker as it replies to the user, look at the Json received to find if has any dependents then run a different dialog, which gets the contextual dependents names and runs a simple for loop generating cards for each dependents, then send the message to the user with the generated cards, however I'm not sure how to intercept the Json and look for any dependents, or there is a button the I need to click within azure which just does it.
There is this experimental sample that has been released by the Bot Framework team which demonstrates how to handle follow-up prompts.
You can download it (you will have to download the whole repo) then plug in your details to the appsettings.json file and you should be able to test it using the Bot Framework Emulator - these were the only steps that I had to perform.
The key part is this method which checks to see if the result contains any prompts and returns the response accordingly - it is called inside the FuctionDialog.
If you're only ever going to be implementing a single level of prompts i.e. you have a question which shows prompts and when you click on one of these prompts it will display an answer rather than taking you to another prompt, then it is possible to take the guts of the logic from the ProcessAsync method (checking for prompts) along with the required classes from the Models folder and the CardHelper class and get this to work in your existing application - you won't have to worry about the QnABotState because you'll only be going a single level deep so you don't need to track where you are in the series of prompts. e.g.
var query = inputActivity.Text;
var qnaResult = await _qnaService.QueryQnAServiceAsync(query, new QnABotState());
var qnaAnswer = qnaResult[0].Answer;
var prompts = qnaResult[0].Context?.Prompts;
if (prompts == null || prompts.Length < 1)
{
outputActivity = MessageFactory.Text(qnaAnswer);
}
else
{
outputActivity = CardHelper.GetHeroCard(qnaAnswer, prompts);
}
await turnContext.SendActivityAsync(outputActivity);
Could someone please advice where do we add this code mentioned above? I am a rookie, have very basic knowledge about programming. Using visual studio with C# for this. How and where do I add this code to make it work? I am also not diving too deep. Just trying to make some simple logic where a user clicks on a few follow up prompts and is taken to the required information. Would really appreciate if someone could help. Thanks
First picture shows the starting follow up prompt.
Second picture that follows the first followup prompt
I wanted to build a web-based system using which you will come to know whether the mobile number is registered with WhatsApp or not? It's just to check whether the number entered in textbox have WhatsApp account or not?
I tried finding resources regarding the same but unable to get any solution on it, please share some link for reference so, I can implement it and get to the final result.
You can use the Whatsapp API through Wassenger of Waboxap to send a text message and via webhook service like Loggly determine if the message was delivered. The person will however get a message, which might cause them to block you.
I am using the List rich response in my assistant action and what I want is to save the option selected by user on the front end only.I am using Firebase as my backend server but I don't want this user selected option to store in firebase but it should get persisted across messages just like contexts.
What are the probable options to implement this?
Also, I found this documentation where we can save the data in conversation, so can I use this feature? In which scenarios can we use this?
Thanks
You can save in parameters using context or in data if using only action-on-google client.
See my answer here
Clicking https://www.messenger.com/t/xxxxxxxx will take you to a bot and continue the conversation, if there was no conversation it'll begin it's 'firstRun' sequence.
Is it possible to create links that will execute a specific dialog and pass in data? It should ignore previous dialog state/stack and start a new stack with the specified data as argument to that dialog.
This is not possible. The url is used to identify the user/bot in messenger. The bot doesn't see the url so it can't read from it.
I would suggest taking a different approach. You could let the user pass in the code instead of adding it to the url.
There is a new functionality in Messenger platform that allows you to send specific messages to a bot: https://developers.facebook.com/docs/messenger-platform/referral-params
I haven't tested it yet, but it may help you.