我正在使用 watson-developer-cloud npm 模块调用 IBM Watson Question and Answer API。我调用服务的代码如下:
question_and_answer_healthcare.ask({
text: 'What are the benefits of taking aspirin daily?'}, function (err, response) {
if (err)
console.log('error:', err);
else {
console.log(JSON.stringify(response, null, 2));
}
});
在打印的回复中,我得到了一系列答案,这些答案只列出了使用的证据,而不是实际的答案。这是一个示例答案元素:
{
"id": 0,
"text": "373C41A4A1E374B1BE189D07EF707062 - Taking Aspirin Every Day : Taking Aspirin Every Day : The Basics : What are the benefits of taking aspirin daily?",
"pipeline": "Descriptive,TAO",
"confidence": 0.96595,
"entityTypes": []
}
如何获得完整的答案文本?