
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
botkit-middleware-recastai
Advanced tools
This middleware plugin for Botkit allows you to seamlessly integrate Recast.ai natural language intent APIs into your Botkit bot.
You can use the Recast.AI API to analyse your text or your audio file, and extract useful informations from it, to personalize your IoT, classify your data or create bots.
Get your token
npm install --save botkit-middleware-recastai
const RecastaiMiddleware = require('botkit-middleware-recastai')({
request_token: '322e96b09ef75ad32bfc8b6f22b857ef',
confidence: 0.4
});
controller.middleware.receive.use(RecastaiMiddleware.receive);
controller.hears(['news'],'message_received', RecastaiMiddleware.hears,function(bot, message) {
// ...
});
Using this middleware with Botkit causes every message sent to your bot to be first sent through recast API for processing. The response from recast is then returned in the incoming messages as seen below :
"intents": [
{
"slug": "weather",
"confidence": 0.95
}
],
"act": "wh-query",
"sentiment": "neutral",
"entities": {
"location": [
{
"formatted": "London, UK",
"lng": -0.1277583,
"lat": 51.5073509,
"type": "locality",
"place": "ChIJdd4hrwug2EcRmSrV3Vo6llI",
"raw": "London",
"confidence": 0.99
}
],
"datetime": [
{
"formatted": "Thursday, 06 October 2016 at 09:00:00 AM",
"iso": "2016-10-06T09:00:00Z",
"accuracy": "day",
"chronology": "future",
"raw": "next Thursday",
"confidence": 0.95
}
]
}
Using the recast hears middleware tells Botkit to look for Recast intents information, and match using this information instead of the built in pattern matching function.
Have fun coding your bot :)
This project is licensed under the terms of the MIT license. Full license text is available in LICENSE.md.
FAQs
Middleware for using Recast.ai with Botkit-powered bots
We found that botkit-middleware-recastai demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.