# wechatbot **Repository Path**: wu_xiaowei/wechatbot ## Basic Information - **Project Name**: wechatbot - **Description**: 将个人微信化身GPT机器人, 项目基于openwechat 开发 - **Primary Language**: Go - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 240 - **Created**: 2023-03-28 - **Last Updated**: 2023-07-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 特别提醒 本机器人基于 OpenAI 的 `gpt-3.5-turbo` 模型 API 实现,请谨慎使用当前机器人,使用频繁可能导致微信封号。 # wechatbot > 最近chatGPT异常火爆,本项目可以将个人微信化身GPT机器人, > 项目基于[openwechat](https://github.com/eatmoreapple/openwechat) 开发。 ## 功能简述 * [x] 提问增加上下文,更接近官网效果 * [x] 机器人群聊@回复 * [x] 机器人私聊回复 * [x] 好友添加自动通过 * [x] 增加代理配置 * [ ] ChatGPT API 调用失败重试 ## 使用条件 * [x] 有 OpenAi 账号,并且创建好 API KEY。 * [x] 微信必须实名认证。 ## 注意事项 * 项目仅供娱乐,**滥用可能有微信封禁的风险,请勿用于商业用途**。 * 请注意收发敏感信息,本项目不做信息过滤。 ## 快速开始 ## 手动构建 ``` git clone https://github.com/869413421/wechatbot.git cd wechatbot // 拷贝并修改配置 cp config.sample.json config.json # 运行程序 go run main.go ``` ## 配置说明 `config.json` ``` { "api_key": "your api key", // OpenAi API KEY "auto_pass": true, // 是否自动通过好友添加 "error_text": "机器人开小差了,我一会发现就去修!", // 错误提示 "reply_prefix": "本消息由 ChatGPT Bot回复:\n", // 消息回复前缀 "chat_params": { // ChatGPT 的相关配置 "temperature": 0.7, "max_tokens": 1024 }, "session_timeout": 60 // 会话超时时间,默认60秒,单位秒,在会话时间内所有发送给机器人的信息会作为上下文。 } ``` ## 使用示例 ![](assets/01.png) ![](assets/02.png)