Possible to upload documents to Watson discovery via Watson Assistant? - ibm-watson

I have been trying to find an answer to this question, but can't seem to have any luck.
Is it possible to upload a document to Watson Discovery via Watson Assistant?
If so, could anyone point me in the right direction?

There is nothing out of the box that could do as you ask. Discovery does now come with a number of mechanisms to populate collections, i.e. Box, Web and sharepoint crawlers along with a manual upload. Non of these are integrated with Watson assistant.
That's not to say what you are looking for cannot be done, but you would need to build the mechanism yourself. As an example you could create a response payload (json packet ) within Watson Assistant that triggers some client code which performs an upload. This upload could then directly push the document into a discovery collection via discovery's API methods.

Related

Sending User Input from IBM Watson Assistant to Database or via E-Mail

I want to implement an evaluation feature to my chatbot. User would be able to rate service on a scale of 1 to 5 and make suggestions.
I guess I would use slots for that and store the provided data in a variable.
What would be the easiest way for me to save and access that data later?
Somehow I need to write it to a database and make that database easily accessible. Or ideally having Watson sending an email with the feedback to myself.
Is there an IBM Cloud Database service available for that?
What would be my first steps in order to achieve this? Maybe you have some tips or documentation links, or even code snippets if it's not to much work for you.
I used IBM Cloud functions to get a joke from an API to Watson via webhook. I used code from the internet. So I am somewhat familiar with the concept, but I need more guidance and couldn’t find anything helpful. Basically I know nothing about NODE.
I would recommend the tutorial and its code on how to build a database-driven Slackbot with Watson Assistant. It uses a webhook and Cloud Functions to interact with a database for various actions. You could use that as blueprint for setting up the webhook and see how the database is invoked.
Make sure to secure the webhook. This can only be done using the command line (CLI), see the Cloud Functions doc on securing web actions.

Modify IBM Watson Chatbot Dictionary in php

I have just started learning IBM Watson Chatbot.
The problem is that I want to change the Chatbot dictionary using php.
In other words, I want to create a php function that sends question and answers to the IBM Watson API so that it can add them to the dictionary.
But I can't find appropriate document and also the correct API endpoints.
Please help me with doing this.
If by add to the dictionary you mean perform crud on entities then you will need the V1 Watson Assistant API - https://cloud.ibm.com/apidocs/assistant#update-entity
In your case you will probably be looking at the update entity method, and update values.

Can I store data captured with a Watson conversation to an external file?

I am looking to capture various answers from a Watson conversation to an external file for analytics. Also looking to capture the length of time a user spends on a session on the bot. First, I need to know whether this is possible and secondaly, the method to do so.
This is really possible. You need to create one application to call the Watson Conversation Service, you can use one function inside the SDK to analyze the conversation.
You need to know: Watson Conversation service is one REST API endpoint, so you can build your app with Python, Java, PHP, Node, etc, and integrating with Watson Conversation.
You will need to use the SDK Watson Developer Cloud for call Watson Services, and, for getting the conversation, you will need to use the getLogs function, and with this, you will access all conversation flows. And with your custom code, you'll store the data.
See one example (Web application using Watson Conversation: Conversation-simple with Nodejs
API Reference for calling the Conversation service and methods.
See how to verify logs inside the UI Conversation.

IBM Watson Dialog Concept

I am creating Watson Dialog Service. My question is : do we always need the formatted XML file for the input or is there a way by which we can feed data in to Watson from other sources like from several web URLs etc? Because when we will have a huge amount of data how XML will be able to deal and creating of XML files will also be difficult as data grows. Kindly help to understand the basic concept.
It is possible to configure an existing XML Dialog by setting up profile variables.
The Set Profile Variables API call on the Dialog Service is key to priming up a dialog: https://watson-api-explorer.mybluemix.net/apis/dialog-v1#/
Sadly, this is also the most poorly documented call in their docs.
Have a look at the What's in Theaters example from IBM. This is by far the most comprehensive application that shows how their Dialog Service can interact with other Watson enabled services like Natural Language Classifier and also third party apps.
Source Code: https://github.com/watson-developer-cloud/movieapp-dialog
Documnentation: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/ega_docs/dialog_ega.shtml
Based on this you have to decide if the Dialog service is suitable for your purpose or can play a small role in your larger application when combined with other services.
Conversational Agent Application Starter Kit: https://github.com/watson-developer-cloud/conversational-agent-application-starter-kit

salesforce rest api

I am new to salesforce. I need to know how to design a WSDL for salesforce REST API inorder to connect salesforce service?
I have a doubt, is it possible to do a GET request(sales force has REST access) on sales force resources and create xsd based on the response xml received for each request?
But I cant able to find particular schema available for salesforce.
or
Is there any other way to design a WSDL for REST API?
Thank you for your answer in advance
For the REST API, you don't need to use the WSDL. You can explore the API by going to
https://{instance}.salesforce.com/services/data/v24.0
For an interactive explorer, check out apigee's salesforce console:
https://apigee.com/console/salesforce
You can also use Workbench to make REST calls to Salesforce:
http://wiki.developerforce.com/page/Workbench

Resources