ibm-watson

Using Watson conversation, how to handle customer, account number etc

北慕城南 提交于 2019-12-01 23:40:47
I'm creating sample application using Watson conversation API in nodejs. I'm trying to get username and send them to Watson and then I want to say hello "$username", also I want to keep that throughout the conversation so that I can if the user ask if I remember the name, Watson can say "yes, "$username"". Can someone help me with sample code, how to use intent in this use case. // Start conversation with Hello message. conversation.message({ input: { text: "Hello" }, }, processResponse); // Process the conversation response. function processResponse(err, response) { if (err) { console.error

How to give personalised greeting in Watson Conversation?

一笑奈何 提交于 2019-12-01 18:58:09
While Defining the Dialog in the Watson Conversation I'm not able to greet user with his/her name or I'm not able to detect contact number sent by the user and rephrase it to the user. Is it possible to do it in the Watson Conversation Api or not. Do you already have access to this information? You can send these values through as context, and refer to them using $context_variable The same goes for collecting information from a user. You can capture things using regular expressions via your application, or using some Spring Expressions, you can see the text.matches here: https://www.ibm.com

How do we get the document file url using the Watson Discovery Service?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 11:28:56
I don't see a solution to this using the available api documentation. It is also not available on the web console. Is it possible to get the file url using the Watson Discovery Service ? If you need to store the original source/file URL, you can include it as a field within your documents in the Discovery service, then you will be able to query that field back out when needed. I also struggled with this request but ultimately got it working using Python bindings into Watson Discovery. The online documentation and API reference is very poor; here's what I used to get it working: (Assume you

How do we get the document file url using the Watson Discovery Service?

可紊 提交于 2019-12-01 08:22:35
问题 I don't see a solution to this using the available api documentation. It is also not available on the web console. Is it possible to get the file url using the Watson Discovery Service ? 回答1: If you need to store the original source/file URL, you can include it as a field within your documents in the Discovery service, then you will be able to query that field back out when needed. 回答2: I also struggled with this request but ultimately got it working using Python bindings into Watson

how to call IBM Watson services from javascript

筅森魡賤 提交于 2019-12-01 06:49:20
问题 I am implementing a virtual agent using IBM Watson services. My application is developed using Jquery, Angular JS & Java.Currently i am calling the watson services from middle layer that is java. But i want to avoid that and call directly from javascript.When i call from javascript using XML Http request, i am getting CORS error.How to solve this? Below is my code: var username = "uid"; var password = "pwd"; var xhr = new XMLHttpRequest(); xhr.open('GET', 'url'); //xhr.withCredentials = true;

IBM Watson visual recognition - invalid API key

柔情痞子 提交于 2019-12-01 06:15:53
I'm trying to use the visual recognition from IBM Watson using their API. Here is the POST request I am sending: https://gateway-a.watsonplatform.net/visual-recognition/api/v3/classify?api_key={MY_API_KEY}&version=2016-05-20 and I specify my image in the body parameter. I always get: { "status": "ERROR", "statusInfo": "invalid-api-key" } I got my key from Bluemix 3 hours ago (they said the key should be working in 5 minutes). Any ideas? Thanks EDIT Since this morning, I have another error: { "status": "ERROR", "statusInfo": "invalid-api-key-permissions" } Is this me or Watson is still under

How to make Watson capture a sequence of numbers (input.text.extract)

房东的猫 提交于 2019-12-01 05:49:19
问题 In my example, I ask for a personal documentation number, the number has 11 digits, and I need that in case the user type the 11 numbers correctly the watson continue with the conversation, and if not, the watson will inform a message defined by me. How to do this? My case: Watson says: All right, I'll check. What is your protocol number? I says: Ex: 35158811233 Watson says: Would you like to finish the service? Watson dont reconigze the number and my conversation flows to the finish. Does

How to get the authentication token for IBM watson STT service?

…衆ロ難τιáo~ 提交于 2019-12-01 01:04:18
I am trying to use the Watson Speech To Text service which needs the following command for the websocket Interface as per the documentation var token = {authentication-token}; var wsURI = 'wss://stream.watsonplatform.net/speech-to-text/api/v1/recognize' + '?watson-token=' + token + '&model=es-ES_BroadbandModel'; I have tried this to get the {authentication-token} using curl command on terminal curl -X GET --user "apikey:{apikey}" "https://stream.watsonplatform.net/authorization/api/v1/token?url=https://stream.watsonplatform.net/text-to-speech/api" The above command yields Error: {"code":401,

How to get exact answers instead of the whole document using Watson Discovery?

一笑奈何 提交于 2019-11-30 05:24:19
After testing the discovery service , it seems useless to me at least or I might be missing something. When I query, it matches the document and returns the whole document . If my document is huge, then for all queries it returns the whole document matching the query text, which is useless. Now Do I have to create a separate document for every query? If that's the case, API.AI or WIT.AI is a better option. Please clear me on what I am missing in here! For now with Discovery, you would need to break up your documents once to put them in a collection, then any query against the collection in

NPM ELIFECYCLE error - using node server.js command

巧了我就是萌 提交于 2019-11-30 04:38:40
I am deploying test-bot on ibm watson as described here https://github.com/eciggaar/text-bot and when I am trying to deploy code locally using CLI foundry it is getting the following errors. I am using Nodejs version 6.10.3 and npm version 5.0.4 can someone please help me with this. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! text-bot@0.1.2 start: `node server.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the text-bot@0.1.2 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be