Allowing user to access MultiLanguage in DialogFlow - multilingual

Does anyone have a working example of code for a dialogflow bot where the user can switch from an english Facebook bot to a french one?
EDIT: Ideally the bot would initially engage in english then would prompt the user to select a language as the first intent. Then would switch over to the other language. Is there a way to do this? Do I have to reinitiate an instance of dialogflow(api.ai) body with the updated lang variable? Or can I send response with "lang" in the json to switch?

Related

Is it possible to detect users click emoji on specific channel for specific server?

I think I need some answer from discord api experts.
I'm wondering if someone can detect using bots below logics.
If we enter the server, we will have initial channel. (for example Welcome)
There some rules will be described and we will have emojis like check / symbols for the server.
And after user click, bot can detect the user id and can send direct message to him/her.
Is it possible for the outside guy of the server? (I mean without any discord related api key)
Thanks
Since I don't have exp with this just went through the discord docs, but didn't find proper resources.

Creating a survey in amazon Alexa with open ended questions

I am trying to create a simple survey skill in Amazon Alexa where Alexa asks the user a question and they respond in any manner they feel like (open-ended). For example, if Alexa asks "Do you cook?", a user may respond in many ways such as "Yes I do cook", "My son does the cooking" etc.
The issue I am getting is that the questions can have similar responses so when I create an utterance in the Alexa dev console they overlap (utterance conflicts) and I am redirected to the error handler. (note each question has its own intent)
Is there any other way I can go about creating a survey without using intents?
Can I capture the full user response to a slot?
The reason being I want to store the user's response in a database.
Unfortunately, Alexa Skills aren't designed to do Speech To Text.
When a user talks to a device, the request goes through multiple steps:
Automated Speech Recognition > It does Speech To Text internally
Natural Language Understanding (NLU) > Using Machine Learning, it will understand what the user want to do (Stop a skill, play music, switch on the light, ...)
Depending of the context, if the NLU understand that the user is trying to respond to your skill (the interaction model match what the user is saying), it will send a POST request to your skill. But it will not send you the Speech To Text.
Documentation
Although, the intent AMAZON.SearchQuery will do the job but you will have to use a prefix: My answer is {query} and not directly {query} because all requests will be redirected to this intent otherwise. It will not look like a good & smooth user experience.

Automatically send messages as current user in discord

I'm new to discord.js but I would like to understand. Is it possible to achieve a functionality that would send message as my current user?
I mean for example I'm normal user on a discord server and I want to send randomly some jokes every day once. But this should happen from my current user, which has the discord name.
I know I can have a bot created and registered, but this is another approach I think.
My questions are: Is this achievable with discord.js or not really? Is this functionality achiavable at all? And where do I begin?
Thanks for any help.
It is possible. It's just like making a discord BOT. But rather than making a bot application and using its token, you just use YOUR token.
This is purely for educational purposes only, and you shouldn't use it for anything else. Everything is possible, especially with discord.js.
What you are describing is a "self-bot", and is against the Terms of Service. As such, it is not supported.
Discord has made an announcement regarding self-bots before.
Here is a relevant excerpt:
Automating normal user accounts (generally called "self-bots") outside
of the OAuth2/bot API is forbidden, and can result in an account
termination if found.

Salesforce Chatbot : use NLP when the bot ask Question

I have setup a chatbot for my customer.
For that, I have configured the bot with different dialogs and pattern to help them going to the response they seek. I also have activated the Einstein bot intent (Natural Language Processing : NLP) to let them type answer to get directly to the right dialogs.
But it's here that I have a problem. When I set a dialog with a question (with or without choices) when I write an NPL answer, the bot stop and wait another input.
Exemple: the bot asks "Are you ok?" if I respond "Agent" (word link to another dialog) the bot stop and if I rewrite "Agent" the bot start the dialogs "Agent".
Dialog config : Dialog config
Chat exemple : Chat exemple
I don't know why it's happening or how can I resolve this. I have read the documentation but nothing link to this problem.
Thanks for your time
I have found the issues. It comes from the entity that we were using. The entity was set with a standard text. So, when a user was writing some text (utterance values or not) it was store and that was good for the bot.
The solution was to create an entity of Value type. Write in it the Buttons label. Like this if a user clicks on the button or write the button label, it can be stored and go further, if not it will go on the intent recognition. And finally, if all the 2 fails, the bot goes in the conversation repair.
Here is a process Schema draw by a salesforce member

watson speech to text issue in node.js

I have created a watson chatbot with conversation, STT and TTS services from below node.js code,
https://github.com/mirkorodriguez/ibm-watson-conversation-full
I have used my English language conversation, STT and TTS services , I am able to get the proper responses back from conversation but when i click on microphone and speak in English, the application is taking the input as Spanish language and responding back with Spanish. Please let me know what needs to be changed to get english language instead of spanish enter image description hereinput.below is the screenshot for the same.
That will be because the sample that you are using will have hard-coded the language to be Spanish. It looks like the sample you are pointing at is actually a clone of the Standard Car Dashboard demo, which is in English, so all you need to do is go to the original sample.
If you do want to change the language, then how to is encapsulated in the forum entry here - https://developer.ibm.com/answers/questions/447834/change-the-text-to-speech-voice-to-frensh-in-the-c.html?childToView=447992#answer-447992

Resources