How to use the node-wit.log.INFO function in node-wit

To help you get started, we’ve selected a few node-wit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hoodsy / messenger-bot-boilerplate / src / api / index.js View on Github external
export const createTextQuickReplies = (options) => options.map(option => new QuickReply({
  title: option,
  content_type: 'text',
  payload: 'empty'
}))

//
// Initialize Wit.ai
// ---
// API Reference: https://wit.ai/docs
//
export const wit = new Wit({
  accessToken: WIT_TOKEN,
  actions: actions,
  logger: new log.Logger(log.INFO)
})

// BOT TESTING MODE
if (TESTING_MODE) {
	console.log('Bot testing mode!')
  dbConnect()
	interactive(wit)
}
github youssef06 / show-around / index.js View on Github external
return;
            })
            .catch(() => {
                context.missingUrl = true;
            })
            .then(() => {
              return context;
            });
    }
};

// Setting up our bot
const wit = new Wit({
    accessToken: config.WIT_TOKEN,
    actions,
    logger: new log.Logger(log.INFO)
});

var app = express();
app.set('port', config.port);
app.use(bodyParser.json({verify: bot.verifyRequestMiddleware()}));

app.get('/', function (req, res) {
    res.status(200).send('Hello world');
});
/*
 * Use your own validation token. Check that the token used in the Webhook
 * setup is the same token used here.
 *
 */
app.get('/webhook', bot.verifyBotMiddleware());
github kehitysto / coaching-chatbot / src / wit-ai / wit-ai.service.js View on Github external
if (!process.env.WIT_AI_TOKEN) {
            throw new Error('No WIT_AI_TOKEN defined');
        }

        this.sendAction = sendAction;

        this.wit = new Wit({
            accessToken: process.env.WIT_AI_TOKEN,
            actions: {
                send: this.send.bind(this),
                set_name: this.set_name.bind(this),
                set_job: this.set_job.bind(this),
                set_age: this.set_age.bind(this),
                reset: this.reset.bind(this),
            },
            logger: new log.Logger(log.INFO),
        });

        this.sessions = new Sessions();
    }

node-wit

Wit.ai Node.js SDK

Unrecognized
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis