Skip to content

Instantly share code, notes, and snippets.

@zaoldyeck
Last active November 8, 2018 14:38
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/c0cea6a2f41b8295de1c7af7237b06ea to your computer and use it in GitHub Desktop.
Save zaoldyeck/c0cea6a2f41b8295de1c7af7237b06ea 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.reply([reply.toLineMessage()])
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment