Git Product home page Git Product logo

green's Introduction

green

说明

本仓库是微信公众号 Ms_haoqi 的源代码,基于wechat-python-sdkTornado,使用图灵机器人API回复用户的消息,可以与用户进行中文对话。

扫码查看公众号:

二维码

更多介绍可以参考博客 Python快速搭建自动回复微信公众号

依赖

pip install -r  requirements.txt

使用配置

需要在根目录下添加conf.json文件,内容为:

{
	"token": "your_weixin_token",
	"appid": "your_weixin_appid",
	"secret": "your_weixin_appsecret",
	"mode": "normal",

	"mongo_db": "green",

	"max_host_count": 5,

	"auto_reply": "yes",
	"tuling_key": "1d2679920f734bc0a23734ace8aec5b1",
    "tuling_url": "http://www.tuling123.com/openapi/api",

    "type": "subscribe"
}

其中需要修改的参数有:

  • token : 修改为微信公众号的Token(令牌)
  • appid : 修改为微信公众号的AppID(应用ID)
  • secret : 修改为微信公众号的AppSecret(应用密钥)
  • tuling_key : 修改为申请的图灵API KEY

另外需要本地安装有MongoDB

注意事项

端口

微信公众号只能设置在80端口,因此 green 默认运行在80端口,如果自己配置端口转发,希望 green 运行在其他端口,可以修改 config.py 文件中 settings 中的 port 字段。

服务器url

green 的默认配置会将所有请求路由到 http://ip:port/wx ,如果希望修改此路由,可以在 config.py 文件中 修改路由表 web_handlers

图灵key

默认的图灵key不能使用,需要自己去 图灵机器人官网 申请自己的图灵key, 再填写到 conf.json 对应字段下。

green's People

Contributors

liuwons avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.