-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathrobot.py
More file actions
34 lines (21 loc) · 699 Bytes
/
Copy pathrobot.py
File metadata and controls
34 lines (21 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from werobot import WeRoBot
import config as cfg
# from chatterbot import ChatBot
# from chatterbot.trainers import ChatterBotCorpusTrainer
# global chatbot
myrobot = WeRoBot(token=cfg.token)
myrobot.config["APP_ID"] = cfg.appid
myrobot.config['ENCODING_AES_KEY'] = cfg.aeskey
# chatbot = ChatBot("ChineseChatBot")
# trainer = ChatterBotCorpusTrainer(chatbot)
# trainer.train("chatterbot.corpus.chinese")
@myrobot.image
def image_repeat(message,session):
return message.img
@myrobot.text
def test_repeat(message,session):
return message.content
# @myrobot.text
# def text_response(message,session):
# answer = chatbot.get_response(message.content).text
# return answer