Esempio n. 1
0
# def wxchat(msg):
#     if msg.text.startswith("小益"):
#         query={
#             "text": msg.text.replace("小益", "").lower(),
#             # "user": msg.member.name,
#             "user": msg.member.name,
#             "right": [],
#             "app": "wechat",
#         }
#         return cbot.chat(query)
#     else:
#         pass
#
# bot.join()

queries = [{
    "user": "******",
    "text": "上个月峰平谷电量是多少",
    "right": ["XM001"],
    "app": "test"
}, {
    "user": "******",
    "text": "来福是",
    "right": ["XM001"],
    "app": "test"
}]
# for i in queries:
#     print(cbot.chat(i))
# print(cbot.contexts)
cbot.chat(queries[1])
Esempio n. 2
0
    "right": ["XM001"],
    "app": "test"
}, {
    "user": "******",
    "text": "前天",
    "right": ["XM001"],
    "app": "test"
}, {
    "user": "******",
    "text": "你好",
    "right": ["XM001"],
    "app": "test"
}, {
    "user": "******",
    "text": "今年政策文件",
    "right": ["XM001"],
    "app": "test"
}, {
    "user": "******",
    "text": "四川成都今年政策文件",
    "right": ["XM001"],
    "app": "test"
}, {
    "user": "******",
    "text": "来福是用电量",
    "right": ["XM001"],
    "app": "test"
}]
for i in queries:
    print(cbot.chat(i))