Skip to content

Instantly share code, notes, and snippets.

@zaoldyeck
Last active November 8, 2018 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zaoldyeck/353a341a661e4cfefa4183ba18f7edde to your computer and use it in GitHub Desktop.
Save zaoldyeck/353a341a661e4cfefa4183ba18f7edde to your computer and use it in GitHub Desktop.
const {LineHandler} = require('bottender')
const olami = require('./nlp/Olami')
exports.lineHandler = new LineHandler()
.onText(async context => {
const text = context.event.text
const userId = context._session.user.id
const reply = await olami.nli(text, userId)
await context.replyText(reply)
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment