关于 slack:watson-developer-cloud botkit-middleware Resource not found

watson-developer-cloud botkit-middleware Resource not found

我是机器人世界的新手。我正在尝试使用 botkit 中间件将在 IBM Watson 上创建的对话服务与 Slack Bot 集成。我只是从 Git (Botkit Slack Integration 获取代码,并尝试使用它来回答来自我的 Watson Conversation 服务的关于 Slack 的查询。但是,在收到松弛消息后,API 会返回以下错误。
Internet 上没有太多关于如何处理这些错误的文档。有人可以帮帮我吗?

`> node simple-bot-slack.js

info: ** No persistent storage method specified! Data may be lost when
process shuts down. info: ** Setting up custom handlers for processing
Slack messages info: ** API CALL: https://slack.com/api/rtm.start
Client server listening on port 5000 notice: ** BOT ID: jarvis
...attempting to connect to RTM! notice: RTM websocket opened info:
Slack message received { type: 'message', channel: 'C72GK14JD',
user: 'U72VDTC2F', text: 'Hi', ts: '1505453454.000117',
source_team: 'T733VG8DS', team: 'T733VG8DS', event:
'direct_mention', match: [ 'Hi', index: 0, input: 'Hi' ],
watsonError: { Error: Resource not found
at Request._callback (D:\
ode\\wrath\\botkit-middleware-master\\examples\\simple-bot\
ode_modules\\watson-developer-cloud\\lib\
equestwrapper.js:88:1
5)
at Request.self.callback (D:\
ode\\wrath\\botkit-middleware-master\\examples\\simple-bot\
ode_modules\
equest\
equest.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (D:\
ode\\wrath\\botkit-middleware-master\\examples\\simple-bot\
ode_modules\
equest\
equest.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Gunzip. (D:\
ode\\wrath\\botkit-middleware-master\\examples\\simple-bot\
ode_modules\
equest\
equest.js:1091:12)
at Gunzip.g (events.js:292:16)
at emitNone (events.js:91:20)
at Gunzip.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
cause:
{ Error: Resource not found
at Request._callback (D:\
ode\\wrath\\botkit-middleware-master\\examples\\simple-bot\
ode_modules\\watson-developer-cloud\\lib\
equestwrapper.js:8
8:15)
at Request.self.callback (D:\
ode\\wrath\\botkit-middleware-master\\examples\\simple-bot\
ode_modules\
equest\
equest.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (D:\
ode\\wrath\\botkit-middleware-master\\examples\\simple-bot\
ode_modules\
equest\
equest.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Gunzip. (D:\
ode\\wrath\\botkit-middleware-master\\examples\\simple-bot\
ode_modules\
equest\
equest.js:1091:12)
at Gunzip.g (events.js:292:16)
at emitNone (events.js:91:20)
at Gunzip.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9) code: undefined, error:
'Resource not found' },
isOperational: true,
code: undefined,
error: 'Resource not found' } }

`


好吧!未找到的资源来自 botkit,因为它无法访问对话 API。我犯的错误是我提供了我自己的对话服务 Workspace 的 URL,而不是应该作为

提及的对话 URL

CONVERSATION_URL=https://gateway.watsonplatform.net/conversation/api

我刚刚纠正了它,它就像butter一样起作用。 :)
如果其他人面临同样的问题,我的建议是检查其他凭据。虽然看起来很简单,但错误总是会发生。

编码愉快!