custom Conversation dialog new intents - watson-virtual-agent

In trying to work with custom dialog I have encountered some issues. While using Virtual Agent as a testing grounds, I have been trying to redirect all input to a Conversation workspace by doing the following:
Disabling all intents other than the 3 mandated ones (Connect to Agent, Agent Settings, None of the Above).
Configure custom dialog to be invoked on the intent "None of the Above".
This should have the effect of sending all input to the "None of the Above" which essentially sends any input straight into the Conversation workspace. When testing this approach without tying in the workspace, the simple canned message does get invoked on any input as expected. However, when adding the workspace ID and Conversation credentials (checked several times for accuracy), I get the error:
Error -- Unable to create custom dialog service
So I am wondering why this might occur.

Your logic is correct but this error means there is a missing or incorrect workspace attribute.
Please use the following values:
Conversation endpoint
"https://gateway.watsonplatform.net/conversation/api"
API Version:
"2016-07-11"

CaesarOG:
The Off_Topic intent is "special" - it invokes your custom workspace without forcing the intent to be Off_Topic (unlike the other intents in Watson Virtual Agent). This design decision was done so that you could do the sort of thing you are trying to accomplish. If in your custom Conversation workspace you have custom intents, and you add your custom dialog to respond to those intents, the Watson Virtual Agent will have Conversation evaluate your utterances against the custom intent detection system and trigger your custom dialog as you would expect.

Related

Do we need webhook when our server is interacting with dialogflow?

We are implementing our customized chatbot using dialog flow. When user enters any text, our javascript code sends this text to our python server and the server interacts with google dialog flow and server gets complete response. I just have couple of questions as below.
When server gets the response from dialog flow, it will process the
response and sends some response to UI. Do we still need to have
fulfillment enabled as our server is getting response? Basically if
server is interacting with dialog flow and getting response, what is
the use of webhook?
Is there anyway to enforce the dialog flow intents require at least
one of entities? I went through Can I make Dialogflow intents require atleast one of the trained entities? which says to enable webhook fulfillment for that intent and if no entities were provided, re prompt the user for at least one of a list of entities. So in my case, if webhook is not needed, do I need to do it in the server once server receives response or is there anyway dialog flow will automatically enforce the condition with out server taking the responsibility?
In your case, no, you don't need to use webhook fulfillment.
You may still wish to use it, however, if you want to separate business logic (which would be in the webhook) from UI/UX logic (which would be in your python server and in the javascript client). But there is no requirement that you separate things this way.
Similarly, you can use your python code to enforce "at least one of" the parameters matching - you're moving that logic from the webhook into your existing server.
Either way, this is a bit kludgy. One alternative if you have different entity types is to have multiple Intents, one for each possible type, and to mark the parameter as required. This way the Intent will only match if the parameter is provided. If you then need to report each of these Intents as the "same" Intent, you can add that logic to your python code.

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();

How To Change "Action and parameters", later on in your Google Action?

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.

Botium dialogflow agent not recognized properly

I am using Botium to validate dialog flow Intents and Training phrases. I have 3 agents in my dialog flow account.
In which one agent only recognizing all the intents properly.others are not. Mostly the intents using fulfillment responses are not recognized.
It is always calling the default fallback intent.
Can you help me solve this issue?
Both agents’ default language code are the same.
Botium is using the Dialogflow API. You have to make sure that the Botium capability "DIALOGFLOW_LANGUAGE_CODE" exactly matches your Dialogflow workspace, otherwise you will receive no responses at all.
So, in your botium.json, you should add something like this:
...
"DIALOGFLOW_LANGUAGE_CODE": "de"
...
See this list as reference.

How to clear the session between two consecutive intents?

We are using bot trees master which uses bot graph dialog for loading graph based dialogs dynamically. We have created a scenario to load multiple intents(whose intents scores are nearly matching). Now the problem I am facing is when I request for single intent , I am getting the bot response and able to enter into next intent but when I request for multiple intents bot is giving the response and when I request for another intent , bot is giving the same response of multiple intents. When bot is entering into multiple intent handler it is not clearing the session and not coming out of that handler. I have tried using session.endConversation().
To understand about bot graph dialog:
https://www.microsoft.com/developerblog/2016/11/11/extending-microsofts-bot-framework-with-graph-baseddialogs-/
Can somebody help on this. Thank you
the builder.IntentDialog() used in this project is no longer considered a best practice. Additionally, further support is not expected. Instead, you will want to use bot.Dialog() to create your dialog flows with a .triggerAction(). The trigger matches on phrases which you can set a score to. Unfortunately, it means you will need to recreate the bot-trees project to fit this new model.
You can find information on managing conversations here, including creating triggers.
If you need a more robust system, you can integrate LUIS into your project. Information regarding recognizing intents with LUIS can be found here.

Resources