Skip to content

Instantly share code, notes, and snippets.

@MKtalk
Created September 3, 2017 06:29
Show Gist options
  • Save MKtalk/dc46e43624469537f938b60c4e184667 to your computer and use it in GitHub Desktop.
Save MKtalk/dc46e43624469537f938b60c4e184667 to your computer and use it in GitHub Desktop.
bot.py
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function, unicode_literals)
from bothub_client.bot import BaseBot
from .qna import Qnamaker
class Bot(BaseBot):
def handle_message(self, event, context):
message = event.get('content')
q = Qnamaker('kbid', 'Subscription-key')
answer = q.answer(message)
self.send_message(answer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment