首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何集成wit.ai和hubot?

如何集成wit.ai和hubot?
EN

Stack Overflow用户
提问于 2018-03-01 10:28:13
回答 1查看 166关注 0票数 2

我想把wit.ai和hubot集成起来。除此之外,我还有一个通过适配器在论坛服务器上运行的hubot。这是次要的。

我安装了https://github.com/guillaumewuip/hubot-wit-helper,安装了npm包,但在运行bin/hubot时得到以下错误

代码语言:javascript
复制
[wit] Stories and POST /converse have been deprecated. This will break in February 2018!
[Thu Mar 01 2018 01:44:58 GMT+0000 (UTC)] ERROR Unable to load /var/discourse/avebot/scripts/avebot: Error: The 'send' action is missing. Learn more at https://wit.ai/docs/quickstart
  at validateActions (/var/discourse/avebot/node_modules/node-wit/lib/wit.js:223:11)
  at validate (/var/discourse/avebot/node_modules/node-wit/lib/wit.js:212:20)
  at new Wit (/var/discourse/avebot/node_modules/node-wit/lib/wit.js:20:35)
  at new Robot (/var/discourse/avebot/node_modules/hubot-wit-helper/lib/Robot.js:24:24)
  at bot (/var/discourse/avebot/scripts/avebot.js:28:26)
  at Robot.loadFile (/var/discourse/avebot/node_modules/hubot/src/robot.coffee:358:11, <js>:226:13)
  at Robot.load (/var/discourse/avebot/node_modules/hubot/src/robot.coffee:377:9, <js>:247:30)
  at Discourse.loadScripts (/var/discourse/avebot/node_modules/hubot/bin/hubot:93:5, <js>:97:13)
  at Object.onceWrapper (events.js:219:13)
  at Discourse.emit (events.js:127:13)
  at Discourse.run (/var/discourse/avebot/node_modules/hubot-discourse-adapter/src/discourse.coffee:63:5, <js>:89:12)
  at Robot.run (/var/discourse/avebot/node_modules/hubot/src/robot.coffee:590:5, <js>:464:27)
  at Object.<anonymous> (/var/discourse/avebot/node_modules/hubot/bin/hubot:168:8, <js>:182:11)
  at Object.<anonymous> (/var/discourse/avebot/node_modules/hubot/bin/hubot:5:1, <js>:185:4)
  at Module._compile (module.js:662:30)
  at Object.exports.run (/var/discourse/avebot/node_modules/coffee-script/lib/coffee-script/coffee-script.js:103:25)
  at compileScript (/var/discourse/avebot/node_modules/coffee-script/lib/coffee-script/command.js:171:29)
  at /var/discourse/avebot/node_modules/coffee-script/lib/coffee-script/command.js:143:18
  at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:532:3)

我将服务器令牌放在上面github页面上的示例脚本的wit_token = 'mywittoken‘部分中,该脚本的开头如下所示

代码语言:javascript
复制
'use strict';

(() => {

    const witHelper = require('hubot-wit-helper');

    const WIT_TOKEN = 'myWitToken';

我怎么才能让它们都正常工作呢?是不是太旧了,不能用了?

EN

回答 1

Stack Overflow用户

发布于 2018-03-02 04:02:48

截至太平洋标准时间2018年2月13日上午10:00,Wit.ai已停产的故事和/converse

Wit包似乎仍然通过wit.runActions() hubot-wit-helper/lib/Robot.js第72行使用stories,该行将在停止work时不再工作。

为了让wit.ai在这个包中再次工作,您需要遵循the official guide关于如何将代码库从stories迁移到/message应用程序接口的说明。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49041713

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档