Comments (2)
@nizamudeenms What data are you referring to? Can you highlight the line number in the code?
from watbot.
I mean my own data retrieved from Database
EG: in node js you send data like this ....
var ConversationV1 = require('watson-developer-cloud/conversation/v1');
var conversation = new ConversationV1({
username: 'username',
password: 'password',
path: { workspace_id: 'workspaceID' },
version_date: '2017-31-05'
});
var context;
conversation.message({}, processResponse);
function processResponse(err, response) {
if (err) {
console.error(err);
return;
}
if (response.output.text.length != 0) {
console.log(response.output.text[0]);
// console.log(response);
if( response.output.text[0].indexOf("Checking traffic fines") > -1 || response.output.text[0].indexOf("checking traffic fines") > -1 ) {
console.log("You have 600 Qatari Riyals of Traffic Fines");
context = response.context;
context.fines = "yes";
conversation.message(
{
input: {},
context: context
}
,processResponse
);
}
context = response.context;
}
}
var stdin = process.openStdin();
stdin.addListener("data", function(d) {
// note: d is an object, and when converted to a string it will
// end with a linefeed. so we (rather crudely) account for that
// with toString() and then trim()
console.log("you entered: [" +
d.toString().trim() + "]");
conversation.message(
{
input: {text: d.toString().trim()},
context: context
}
, processResponse);
});
In the above code, this block is validating if user has fines, appends 'fines' variable to context and sends 'fines' variable in the Blumix server. If I run this node js code in local console its giving the the proper output but I don't know how to convert this code to java.
if( response.output.text[0].indexOf("Checking traffic fines") > -1 || response.output.text[0].indexOf("checking traffic fines") > -1 ) {
console.log("You have 600 Qatari Riyals of Traffic Fines");
context = response.context;
context.fines = "yes";
conversation.message(
{
input: {},
context: context
}
,processResponse
);
In my case the fines are retrieved from database and sent to blue mix.
I want to know how to send data 'fines' from java ... It should be read by blue mix....
Please tell me how can I append a variable 'fine' in java context and send it to blue mix in java.
It will better if you give me your mobile number to call you. . I have mailed you please share mobile no in mail...
from watbot.
Related Issues (17)
- Context isnt working HOT 1
- Apk installation taking too long time HOT 2
- How to use hyperlink in the Watson Dialogue HOT 2
- Problem with child nodes HOT 1
- How can i change speaker label in SpeakerLabelsDiarization class l HOT 3
- java.lang.NullPointerException? HOT 4
- Errors
- Which build.gradle to update to enable Watson services?
- [Question] How to integrate this to Flutter application
- Android studio is not accessing IBM watson
- app closed when I pressed mic button HOT 3
- how to add STT customer model HOT 3
- Getting Error Gradle Entry compile 'com.ibm.watson.developer_cloud:conversation:3.8.0' HOT 1
- IllegalArgumentException: Unknown pattern character 'X' HOT 2
- Watson not communicating HOT 3
- cant get response of any node HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watbot.