我正在尝试learning_opt_out true
在 node.js中创建一个新的 watson-conversation 工作区。以下代码创建了工作区,但learning_opt_out
仍然是false
.
你能帮我吗?
var watson = require("watson-developer-cloud");
var conversation = new watson.ConversationV1({
username: 'user',
password: 'password',
url: 'https://gateway-fra.watsonplatform.net/conversation/api/',
version_date: '2017-05-26'
});
var workspace = {
name: 'API test',
description: 'Example workspace created via API.',
language: 'de',
learning_opt_out: 'true'
};
conversation.createWorkspace(workspace, function(err, response) {
if (err) {
console.error(err);
} else {
console.log(JSON.stringify(response, null, 2));
}
});
运行此代码会创建以下输出:
{
"name": "API test",
"created": "2017-10-27T12:16:11.170Z",
"updated": "2017-10-27T12:16:11.170Z",
"language": "de",
"metadata": null,
"description": "Example workspace created via API.",
"workspace_id": "xxx",
"learning_opt_out": false
}