botkit-middleware | connect Watson Conversation Service to different chat | Bot library
kandi X-RAY | botkit-middleware Summary
kandi X-RAY | botkit-middleware Summary
A middleware to connect Watson Conversation Service to different chat channels using Botkit
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of botkit-middleware
botkit-middleware Key Features
botkit-middleware Examples and Code Snippets
Community Discussions
Trending Discussions on botkit-middleware
QUESTION
My project uses the botkit-middleware-watson to talk to IBM Watson. Now I need to make a mock server for this Watson service.
This is just one line of code which calls Watson's API.
...ANSWER
Answered 2019-Aug-24 at 19:16botkit-middleware-watson examples like this one show how WatsonMiddleware
can be configured:
QUESTION
Im currently hosting the Slackbot on IBM cloud. Everything works fine until I want to add Interactive messages.
This is a part of the documentation
In order to use interactive messages, your bot will have to be registered as a Slack application, and will have to use the Slack button authentication system. To receive callbacks, register a callback url as part of applications configuration. Botkit's built in support for the Slack Button system supports interactive message callbacks at the url https://_your_server_/slack/receive Note that Slack requires this url to be secured with https.
So what I understod is the BOTKIT creates an Request URL I can use. in this case https://_my_ibm_cloud_url_/slack/receive
But of course this does not work, otherwise I wouldn't be here :)
Does anybody have an idea?
This is how it's setup at the moment.
server.js
...ANSWER
Answered 2018-Dec-06 at 15:49It doesn't look like you've called the configureIncomingWebhook method to create the actual webhook endpoint. See the docs below:
https://botkit.ai/docs/readme-slack.html#botconfigureincomingwebhook
QUESTION
I followed this tutorial to deploy a Slackbot with Watson Assistant. The tutorial uses server actions in the dialog to directly interface with a database. To connect Slack with Watson Assistant the tutorial uses the Conversation connector. That works fine, but I am interested in how to do the same with Botkit and the Botkit Middleware provided by Watson Developer Cloud.
How can I use the serverless actions, how do I obtain and pass the necessary API key?
...ANSWER
Answered 2018-Jun-26 at 13:40There is actually code that demonstrates how to configure the API key for IBM Cloud Functions and pass it as context variable to Watson Assistant. It makes use of the before
method to add the API key to the context variable. The value is configured in a separate file together with the other app-related credentials. The code tests whether the context variable and the key exist, else it is added:
QUESTION
I'm using this sample code here: https://github.com/watson-developer-cloud/botkit-middleware.
I have essentially setup twilio, watson conversation with an active workflow already. My problem is that when sending text message to twilio, twilio sends a POST request to a webhook that I exposed using ngrok. But when my code picks up the POST request it's being received with empty body. no text, user, from, to. or whatever. I'm using Twilio SMS Bot and not the Twilio IPM Bot.
from botkit
...ANSWER
Answered 2018-Mar-15 at 23:29Twilio developer evangelist here.
I noticed the server in question only parses incoming requests as JSON. Twilio sends webhooks in the format application/x-www-form-urlencoded
so you need to tell bodyParser
to parse those types of requests too.
I'd add the following to server.js
QUESTION
I am new to the bot world. I am trying to integrate a Conversation service create on IBM Watson with a Slack Bot using the botkit middleware. I have simply obtained the code from Git (Botkit Slack Integration and am trying to use that to answer queries on Slack from my Watson Conversation service. But, upon receiving the slack messages, the API returns following errors. There is not much documentation on how to handle these errors on Internet. Could someone please help me out?
...`> 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:\node\wrath\botkit-middleware-master\examples\simple-bot\node_modules\watson-developer-cloud\lib\requestwrapper.js:88:1 5) at Request.self.callback (D:\node\wrath\botkit-middleware-master\examples\simple-bot\node_modules\request\request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request. (D:\node\wrath\botkit-middleware-master\examples\simple-bot\node_modules\request\request.js:1171:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Gunzip. (D:\node\wrath\botkit-middleware-master\examples\simple-bot\node_modules\request\request.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:\node\wrath\botkit-middleware-master\examples\simple-bot\node_modules\watson-developer-cloud\lib\requestwrapper.js:8 8:15) at Request.self.callback (D:\node\wrath\botkit-middleware-master\examples\simple-bot\node_modules\request\request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request. (D:\node\wrath\botkit-middleware-master\examples\simple-bot\node_modules\request\request.js:1171:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Gunzip. (D:\node\wrath\botkit-middleware-master\examples\simple-bot\node_modules\request\request.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' } }`
ANSWER
Answered 2017-Sep-15 at 05:55Alright! The resource not found was coming from the botkit because it was unable to reach the Conversation API. The mistake I was doing was that I was providing the URL of my own conversation service Workspace instead of the conversation URL that was supposed to be mentioned as
CONVERSATION_URL=https://gateway.watsonplatform.net/conversation/api
I just corrected it and the thing works like butter. :) If anyone else is facing the same problem, my advice will be to check the other credentials as well. Although it seems pretty straightforward, mistakes can always happen.
Happy coding!
QUESTION
I am having trouble formatting the slackbot responses. The slactbot is connected with watson conversation through botkit (https://github.com/watson-developer-cloud/botkit-middleware). Thanks a lot
My ultimate goal is to format a JSONArray as a list in the response. But I couldn't find anything about it. I can't even output a newline with '\n' or '\\n'. On the Watson Dashboard, I would output something like this:
I notice that you shop for: $e_list.join('\n')
...ANSWER
Answered 2017-Jul-24 at 17:39You need to set this "\n" inside your code to works. Like:
QUESTION
I'm trying to api.ai middleware plugin with botkit-sms, I'm tryting to debug the source code, why this isn't working, but will be helpful if you can provide some input
Source code of the library https://github.com/krismuniz/botkit-sms/
...ANSWER
Answered 2017-Apr-27 at 22:29Passing apiai.hears
into the hears function here changes how pattern matching and hears works. You are now matching intents instead of user using regex on user input.
But the issue is that API.ai middleware uses an ===
operator when matching, not regex. So the pattern .*
won't match anything unless you have an intent named that.
QUESTION
I'm new to Angular and I would like to integrate a Watson conversation bot into my angular module, but i can't include a library in Angular. I am using botkit-middleware-watson to get the Watson answer.
With the code bellow, I manage to get a slackBot running.
...ANSWER
Answered 2017-Jan-31 at 12:39Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install botkit-middleware
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page