在你的四个条件,都可以使用IBM沃森来完成。
1: 使用会话业务用于创建一个聊天机器人,你可以保存所有的用户输入与context
变量。
IBM Watson在Python,Node JS和Java SDK中提供了一些示例,只需点击一些编程语言查看示例和所有代码即可。
2: 本示例使用来自Conversation Simple Node.js链接的Cloudant DB(nosql),但您可以使用其他。
function log(input, output) {
if (logs) {
// If the logs db is set, then we want to record all input and responses
var id = uuid.v4();
logs.insert({'_id': id, 'request': input, 'response': output, 'time': new Date()});
}
}
if (cloudantUrl) {
// If logging has been enabled (as signalled by the presence of the cloudantUrl) then the
// app developer must also specify a LOG_USER and LOG_PASS env vars.
if (!process.env.LOG_USER || !process.env.LOG_PASS) {
throw new Error('LOG_USER OR LOG_PASS not defined, both required to enable logging!');
}
// add basic auth to the endpoints to retrieve the logs!
var auth = basicAuth(process.env.LOG_USER, process.env.LOG_PASS);
// If the cloudantUrl has been configured then we will want to set up a nano client
var nano = require('nano')(cloudantUrl);
// add a new API which allows us to retrieve the logs (note this is not secure)
nano.db.get('car_logs', function(err) {
if (err) {
console.error(err);
nano.db.create('car_logs', function(errCreate) {
console.error(errCreate);
logs = nano.db.use('car_logs');
});
} else {
logs = nano.db.use('car_logs');
}
});
3:所有通话谈话有一定的ID,您可以用context
变量访问此。例如(在IBM沃森谈话:
context.conversation_id
4:您可以使用其他的服务从IBM沃森它,但我建议:AlchemyAPI或发现,取决于你真正要做的,但需要。看看这两个,我敢肯定他们倾向于帮助你
谢谢你Sayuri。 – Amit
不客气 –
你的答复为我清除了几件事我还有一个问题,我会非常感激,如果你我可以将AI添加到这个对话服务中,以便它可以根据用户的响应提出问题。但是,如果我[管理员]想要分析用户的响应,我会ss我需要在DB中的用户答案之上添加额外的分析引擎。IBM Watson是否提供任何响应分析服务,还是需要使用单独的技术? – Amit