Button-based chatbots - chatbot

I have the following use case:
The user starts a chat and selects options (something like a tree), in some cases an administrator can enter the chat and give a response.
My question is: are chatbot systems useful in this case?
I have no experience in chatbot but all the examples that I find on the internet are about NLP.
I appreciate if you can recommend an open source library

I think Dialogflow is a pretty good one to create chatbots. It is free and using custom payloads (tree with options, buttons, chips, etc.). You can make them say some repeated stuff. You would have to type instead.
I have a video where I create a simple chatbot that can take data stored in google sheets and send that details to a user if he asks for the details. If you are interested, please check it out!
Also, here is the Dialogflow console link.

Related

Craft CMS: sending email after entry is published

I want to create a site with a channel. On this channel, I want to post activities. Inside the entry, there will be a category selectable with an email address within. Once I publish the entry, craft should send an email to the email of the selected category with the details of the entry (like an info mail "hey, there is a new activity. have a look).
I googled and searched for hours, but I couldn't find a suitable solution. I stepped over craft modules, but I am new to programming and the explanations are pretty overwhelming. Is there anyone who can help me and would walk me step by step through creating such a solution?
Modules are indeed the way to go. They allow you to write custom code to extend Craft CMS functionality.
What you want can be achieved with the help of events: Craft CMS dispatches a lot of events at various points in the lifecycle of every request. You can listen to these events to react accordingly.
In your case, you should have a look to the EVENT_AFTER_SAVE of the craft\elements\Entry class. To help you get started, Craft provides an event listener code generator.
You then need to write a module that includes the generated code. This article from the Craft knowledge base should help you. This article from NYStudio107 is also a nice introduction.
There's a discord community for Craft CMS where you can ask for help as well as a dedicated stackexchange site.
If you need more help here, we'll need to see some code.

Create custom Google Smart Home Action

I have a Google Nest Hub Max and I want to increase its capabilities for a custom need:
"Hey Google, add xyz to my work planning"
Then I want to make an HTTP call to my private server
The private server returns a text
The text is displayed in the Google Nest Hub Max screen + speak-out.
How can that be achieved?
Originally I thought that this will not be difficult. I've imagined a NodeJs, Java, Python or whatever framework where Google gives me the xyz text and I can do my thing and return a simple text. And obviously, Google will handle the intent matching and only call my custom code when users say the precise phrase.
I've tried to search for how to do it online, but there is a lot of documentation everywhere. This post resumes quite well the situation, but I've never found a tutorial or hello world example of such a thing.
Does anyone know how to do it?
For steps 2. and 3., I don't necessarily need to use a private server, if I can achieve what the private server does inside the Smart Home Action code, mostly some basic Python code.
First - you're on the right track! There are a few assumptions and terminology issues in your question that we need to clear up first, but your idea is fundamentally sound:
Google uses the term "Smart Home Actions" to describe controlling IoT/smart home devices such as lights, appliances, outlets, etc. Making something that you control through the Assistant, including Smart Speakers and Smart Hubs, means building a Conversational Action.
Most Conversational Actions need to be invoked by name. So you would start your action with something like "Talk to Work Planning" or "Ask Work Planning to add XYZ'. There are a limited, but growing, number of built in intents (BIIs) to cover other verticals - but don't count on them right now.
All Actions are public. They all share an invocation name namespace and anyone can access them. You can add Account Linking or other ways to ensure a limited audience, and there are ways to have more private alpha and beta testing, but there are issues with both. (Consider this an opportunity!)
You're correct that Google will help you with parsing the Intent and getting the parameter values (the XYZ in your example) and then handing this over to your server. However, the server must be at a publicly accessible address with an HTTPS endpoint. (Google refers to this as a webhook.)
There are a number of resources available, via Google, StackOverflow, and elsewhere:
On StackOverflow, look for the actions-on-google tag. Frequently, conversational actions are either built with dialogflow-es or, more recently, actions-builder which each have their own tags. (And don't forget that when you post your own questions to make sure you provide code, errors, screen shots, and as much other information as you can to help us help you overcome the issues.)
Google's documentation about how to design and build conversational actions.
Google also has codelabs and sample code illustrating how to build conversational actions. The codelabs include the "hello world" examples you are probably looking for.
Most sample code uses JavaScript with node.js, since Google provides a library for it. If you want to use python, you'll need the JSON format that the Assistant will send to your webhook and that it expects back in response.
There are articles and videos written about it. For example, this series of blog posts discussing designing and developing actions outlines the steps and shows the code. And this YouTube playlist takes you through the process step-by-step (and there are other videos covering other details if you want more).

Can I make google assistant understand my entities and train it for the same or I need DialogFlow?

I know that DialogFlow can be trained for particular entities. But I wanted an insight on whether or not Google Assistant can understand my entities?
I've tried to search on official site but could not get clear understanding on whether or not I need to go for dialogflow.
Actions on Google will allow you to extend Google Assistant by writing your own app (i.e. an Action). In your Action, you can tailor conversational experience between the Google Assistant and a user. To write an action you will need to have a natural language understanding mechanism, which is what Dialogflow provides.
You can learn more about Actions on Google development in the official docs. There are also official informational talks about Actions on Google and Dialogflow online, such as
"An introduction to developing Actions for the Google Assistant (Google I/O '18)"
I'm not quite sure what you mean with your last sentence, there is no way to define entities for Google Assistant other than Dialogflow. Regarding your question, there is indeed no information on how entities are handled and how good one can reasonably expect the recognition to be. This is especially frustrating for the automated expension feature, where it is basically a lottery which values will be picked up and which will not. Extensive testing is really the only thing one can do there.

How does Microsoft LUIS filter swear words?

We've been using Microsoft's LUIS cognitive service as an ML tool for our Chatbot. We've observed that whenever there is a swear word entered, there is no response from the bot. I couldn't find anything about this in the documentations, except that LUIS can identify slang words.
I would also like to know if anyone knows how to customize your Chatbot's response in such a scenario?
Any help would be great. Thank you!
LUIS doesn't filter swearwords. Regarding an explanation for the lack of response from your chatbot, it would be necessary to see the code for the bot. If the user isn't in a dialog and utters a swearword, your bot should either map it to a defined intent, map it to the crowd-favorite "None" intent, or do nothing with it. To my knowledge the only time the chatbot will do nothing, is when a handler for the "None" intent isn't defined.
To handle an utterance that contains swearwords it's necessary to know the context behind it.
At certain points, the SDK you're using may block swearwords indirectly. E.g. a user saying, "#$%! yes!" to a confirm prompt may have the bot asking the user to repeat themselves with either a yes or no response.
An extremely simple and intrusive way to handle swear words in the Node SDK would be to create a bot.dialog() that activates through the use of .triggerAction(). You can use regexp so the chatbot responds to swearwords by switching to this dialog. You can also use a custom Intent Recognizer to recognize swearwords.
The 'Swear' intent needs to be implemented by hand in LUIS. I suggest to separate it from the None intent in LUIS.
In the Bot, it is possible to have the same handler for None and Swear intents, or to have separate handlers and potentially different Bot behaviors for these two intents.

understanding microsoft bot platform

My company has started looking into using a platform to generate chat bots, we came across microsoft's framework and are considering using it. we have a few concerns that we need to understand better about their product and would appreciate it if you could help us.
1) What kind of support do they give us when using Facebook messenger compared to what facebook gives natively? things like quick answer or image sending, buttons on the messages? do they support any of that?
2) We would like if you could elaborate exactly what the platform may give us and why we should use it, what we need is to keep all our logic in our servers and have a platform that will interact with all the messengers for us and keep us from coding to each a different code.
3) like question 1 but for telegram and any other messenger? (custom keyboards and stuff like that).
thanks for the help!
Thanks #ejadib
Regarding your second question, your bots logic does stay within your bot and your servers. The Bot Framework provides three things:
1) Connectivity services between your bot and the channels your users are on. All of the logic continues to reside in your bot.
2) Optionally - Bot Building SDK's you can use to facilitate dialog within your bot. These are SDK's you would code to, but still deploy to your own servers.
3) A directory where you could optionally publish your bot.
As #ejadib says, where we can be consistent across channels we add functionality to the core API; and where functionality is very specific to a channel we expose it through the ChannelData property of the C# SDK (SourceEvent in Node).
Regarding 1 and 3, if you want to be able to take advantage of special features or concepts for a channel (Facebook/Telegram) BotFramework provide a way for you to send native metadata to that channel giving you much deeper control over how your bot interacts on a channel. The way you do this is to pass extra properties via the ChannelData property (in C#).
Some things are already supported in the framework, for example Rich Cards will render differently depending on the channel.
Here you will find the information (including Facebook and Telegram).
Also, here you can find how for example you can use things like quick replies.