Predefined User Input with Watson Assistant - watson

I'm trying to build a Watson chatbot (Assistant) that will use pre-defined dialog options instead of the free-flowing text input method, such as this: https://www.socialmediaexaminer.com/wp-content/uploads/2017/01/sh-techcrunch-facebook-messenger.png .
Is there a way to do this, either in "advanced mode" or through the GUI?

If you are deploying your chatbot to a WordPress site, we actually support this functionality out of the box.
Once you install the IBM Watson Assistant plugin and go to its settings page, you'll find detailed instructions in the Advanced tab.
The process is quite simple.
In the JSON editor for your node response, add an array of predefined options on the same level as the text key.
The options will then be displayed as buttons in the chat box, whenever that particular response is issued:
If you are not using our WordPress plugin, it's trickier because your app will have to implement this last part from scratch. However, the basic idea remains the same.
Your app could retrieve the options values from the response and generate the appropriate buttons depending on these values. The WordPress plugin just makes the whole process dead simple.
It's worth noting that this options syntax is a convention we introduced through our WordPress plugin rather than an official specification. It's very likely that the Watson Assistant team will introduce a standard syntax to handle this scenario, in the future.

There is no way to do this specifically through Watson Assistant because you are just building the backend component, not the full application that can use Watson Assistant.
You would have to program the front end that consumes the Watson Assistant API to send the pre-defined dialog options you want to send.
Additionally, you could deploy to Facebook Messenger. It might be able to do this through config on their UI, but I haven't used it. I would recommend editing your question to be specific to Facebook Messenger if you want an answer about the functionality available there.

Related

Reverse engineering website : cannot find the form inputs in the post request

I need to interact with an external website I don't own. This external website requires credentials that I have. My goal is to add a user but the external website does not offer an external API. It looks like they are using Vaadin.
So to add a new user I need to manually fill in a form. Yet I have been searching for the route the "form" takes to post the input I give but could not find any.
Here is my issue : when I look at the HTML source code in browser I cannot see any form tag. The buttons have all the same id "button". When I fill in the form and look at the network tab in the developer tools, in the "parameters" section I cannot see the inputs I just gave although the POST request does appear. The cookies tab does not show the inputs either.
Consequently my questions are : why can't I find the inputs in the POST request and where can they be ?
Please note : this external website is a medical site so I prefer not share the url and they don't offer a mobile app, so there is no mobile API I could reverse engineer.
Any help appreciated :-)
Not stating the Vaadin version makes that a tad harder give an exact
answer, but at the core both the Vaadin 8 and 10+ behave the same way.
And the short answer to your question is: without another entry-point,
like an API, this can not simply be done using just some POST-Request.
Vaadin is not simply a html-form/request/response-html based framework;
it holds the scenegraph on the serverside in a session. All
communication is done via a single endpoint to the server and state
changes only are communicated back to the client.
For what you are after, your best bet is to use test automation
frameworks like selenium, geb, cypress, ...

Is there an API for asking the Google Assistant general questions via plaintext?

I'm looking for a way to integrate the Google Assistant into my chatbot and be able to get answers to general questions like "whats the weather?", "how tall is X?", "what does X mean?" etc. (just how Google Home works). Ideally this would be over a REST API and I'd get the response back inside of a JSON payload.
I looked through the Google Assistant SDK docs but it wasn't clear on how I could host/build an API that does this. Any ideas on if something like this already exists?
Yes, you use the Google Assistant SDK.
There isn't a REST API, since other requirements for the SDK are poorly suited for REST. Instead it uses gRPC, which lets them publish a standard interface and lets you compile this interface to local language bindings.
IF you are using Python, C++, or Node.js, there are already libraries available which allow you to skip the gRPC setup yourself.

Rally SDK 2 - Given a story A and a story B, how can I say that B is a successor of A thanks to Javascript API?

I'm using the Rally SDK 2 to manipulate user stories from Javascript in a "Custom HTML" application.
I can query a story and retrieve its attributes.
I can update some of the attributes, like the Name of the Iteration for instance.
How can I add a successor to my story?
If I understand well, I should edit the "/HierarchicalRequirement/.../Successors" of my story, but I don't understand how to do that.
Would someone have an example, please?
Unfortunately, I don't have an exact example you can use, but the successors (or predecessors) are 'collections'. As such, you need to 'add' to the collection. There is an explanation of some of this here: https://docs.ca.com/ca-agile-central/saas/apps/2.1/doc/#!/guide/collections_in_v2
Built into the model for the artefact are routines to handle all the details. If you want more details, then you can download the sdk-debug.js file from the Rally server. To get to it, open up the developer tools in your browser and have a look where a custom app would get the sdk.js file from. The debug variant is formatted for humans to read and a very useful source of how to do things at the low levels. The definition of Rally.data.wsapi.ModelFactory has some good tips.
One of the recommendations I make to people starting out writing custom apps, is to use the developer tools in the browser to watch the network traffic that the Rally UI makes - and then work backwards to code.

Google assistant SDK custom commands

Currently following hot word example, I create custom commands like turn screen on/off, how do I disable voice response "sorry I can't help you"
there are multiple ways do it.follow this link and details google assistant
1 - if your using this method/project creation and run it. then you can parse the request/query in event.args['text'] based on which you can perform activity local without sending it to google assistant. problems: google will response with some voice message parallel.
2 - use IFTTT, pretty simple to work with. basic use with webhooks takes little time though. this link is useful and use ngrok for local webhook url
3 - use API.AI this is for advanced projects where you depend on google to assist with questions recognization and response with your answers from webhooks. it's not straight forward to work with, the details and tutorials that are given are with google cloud functions which works only with node.js as of now. if your python programmer or any other languages google has examples in github which are again not stright forward, I guess.

Using Google as a substitute of a web interface for an existing client server application

I am in researh mood and one of the tasks I have in my to do list is:
"Finalize the techonlogy to use for creating a web interface to my existing Client Server application".
My application is very rich and full of features. It makes sense it is has rich client UI, because it is a productivity tool. Many shortcuts, many things without any click. So I am not looking for a full replacement.
My app has some features that would be good to be used also from a web interface.
Some of them:
1) multi user calendar (every item I see in the calendar is linked to something in my app, for example "today 11:00: recall customer 'Dummy ltd'". This is not a simple memo, it is also linked to the customer), so i can see my and others tasks.
2) Confirm some task (yes I did this!)
3) see some report (some graph or some tabular report)
Of course this are not simple outputs, they can contain some logic (for example some calendar items must be readonly, some others can be edited).
This said, I was considering whether doing all this with Google would be a reasonable choice. In this way I don't have to install anything, simply interfacing with google would be enough. I can map my application users to one (or more) google users and use all the google features (calendar, charts, tasks, ....).
May you comment on this? Which are the good/bad points.
Some good points I can forsee:
1) no need to design any UI, just connect to an existing powerful and userfriendly system
2) the applicatino will automatically be compatible with google ("is it possible to export on google?" is a typical question I recieve)
3) google already provides the interface for the points I wrote above (tasks, calendar, charts, ...)
4) no deployment issues. No server hosting. just need to configure the users with some wizard.
Some bad points:
1) Which is the long term support? Will the Google APIs change every month or some of them will be stable for years?
2) How much may I push? How much is it possible to customize? I mean can I write some logic like "this item is readonly", "this item is not"? (afaik in google I can share a calendar with other people, in different ways, but there is no way to make only a part of it readonly. Of course I could do this with a trick, like having 2 calendars, one readonly and the other not. But is it possible to change the default google behaviour like for example in calendar case?)
3) of course I am limited, writing "from scratch" allows me to do everything.
Final note: my app is a Delphi client/server application. The communication will be done from an application server that will interact with the google apis.
As I understand, the API are stable, for example the Calendar API documentation says
Google periodically updates the
Calendar Data API in order to deliver
new features and to repair defects
discovered in previous versions. In
most cases, these changes will be
transparent to API developers.
However, occasionally we need to make
changes that require developers to
modify their existing applications.
So as long as the service exists I would expect only small changes. Services however can disappear from one day to the other (see Google Wave for example) so I would check the requirements of an 'exit strategy', at least a way to export the most critical information.
My application is very rich and full
of features. It makes sense it is has
rich client UI, because it is a
productivity tool
It sounds like Morfik might be a good choice for creating web interface for your application. Once you like it, you might even make the whole application in it. ;-)

Resources