Created
September 3, 2017 06:29
-
-
Save MKtalk/dc46e43624469537f938b60c4e184667 to your computer and use it in GitHub Desktop.
bot.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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