Skip to content

15103875d/Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chatbot

Test chatbot based on Baidu UNIT 2.0

Description This bot is a test version which only support simple Q&A and Support language: Simplified Chinese Function: Movie ticket bossting

User manual:

Via Wechat offical account:

  1. Please put "movie-avalible/" ,"session_ids/", "app.py", "authentication.py" and "Chatbot.py" to your the website path of your server(E.g. For nginx, please put it in /var/www/html or its subfolders).
  2. Make sure the port 80 is accessible.
  3. Visit https://mp.weixin.qq.com for setting WeChat official account for auto-reply.
  • Choose "Development" -> "Basic Config", Record "AppID" and "AppSecret". (If you cannot find "AppSecret", Enable it)
  • Click "Server Config" -> Click "modify", fill the form with correspond content. The "URL" should be the path that "app.py" located. Set "token" by yourself and we suggest to use random "EncodingAESKey".
  • Modify the constructor of class "Get" in "app.py". set self.token = "$token", self.Appid = "$AppID", self.AppSecret = "AppSecret".
  • Launch "app.py" in your server.
  • Click "submit". If the reply is "sumbit successfully", it means the config is enabled.
  1. Try to send message in your offcial account

Offline: Use "jupyter" to run "Chatbot.ipynb" and run all column in orders, and you can enjoy in the "test" function

用户手册: 通过微信公众号:

  1. 将"movie-avalible/" ,"session_ids/", "app.py", "authentication.py" 以及 "Chatbot.py" 放置于服务器网页目录下 (例如使用nginx,则放在/var/www/html或其子目录)
  2. 确认服务器80端口开放
  3. 进入微信公众平台, 设置自动回复:
  • 点击左侧 开发 -> 基本配置,找到开发者ID和密码(没有则启用);
  • 点击 服务器配置 -> 修改,在服务器配置填写对应的内容, URL填写对应app所在的目录,token自选, EncodingAESKey建议随机生成。
  • 将"app.py"的Get构造函数中 将self.token 的值改为(3)中的token, 将AppID和AppSeceret的值改为(1)中的开发值ID和密码。
  • 启动服务器上"app.py";
  • 点击“提交”,若提示“提交成功”,则服务器配置成功
  1. 在公众号对话

离线模式: 使用"Jupyter" 打开 "Chatbot.ipynb", 依次跑完所有块, 再最后的test函数中进行对话测试。

Github link: https://github.com/15103875d/Chatbot

About

Test chatbot based on Baidu UNIT 2.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published