{"id":13642625,"url":"https://github.com/small-tou/wechat-ai-summarize-bot","last_synced_at":"2025-04-07T14:15:39.835Z","repository":{"id":222968840,"uuid":"682087571","full_name":"small-tou/wechat-ai-summarize-bot","owner":"small-tou","description":"微信群聊总结助手 JS 版","archived":false,"fork":false,"pushed_at":"2024-05-29T10:52:53.000Z","size":2174,"stargazers_count":215,"open_issues_count":13,"forks_count":30,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-31T12:08:13.404Z","etag":null,"topics":["ai","chatgpt","wechat","wechaty"],"latest_commit_sha":null,"homepage":"https://zhinang.ai","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/small-tou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-23T12:12:39.000Z","updated_at":"2025-03-25T17:08:02.000Z","dependencies_parsed_at":"2024-08-02T01:16:17.525Z","dependency_job_id":"43505806-d87f-4f13-9a92-1e15f87eef38","html_url":"https://github.com/small-tou/wechat-ai-summarize-bot","commit_stats":null,"previous_names":["small-tou/wechat-ai-summarize-bot"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/small-tou%2Fwechat-ai-summarize-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/small-tou%2Fwechat-ai-summarize-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/small-tou%2Fwechat-ai-summarize-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/small-tou%2Fwechat-ai-summarize-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/small-tou","download_url":"https://codeload.github.com/small-tou/wechat-ai-summarize-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135138,"owners_count":20889420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","chatgpt","wechat","wechaty"],"created_at":"2024-08-02T01:01:34.064Z","updated_at":"2025-04-07T14:15:39.812Z","avatar_url":"https://github.com/small-tou.png","language":"TypeScript","funding_links":[],"categories":["Chatbots"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ch1 align=\"center\"\u003e微信群聊总结 AI 助手 (JS and Electron ver)\u003c/h1\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/aoao-eth/wechat-ai-summarize-bot/releases/tag/1.1.0\"\u003eMac 版下载\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e  \n    \u003ca href=\"https://zhinang.ai\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Power%20by%20zhinang.ai-green?\u0026labelColor=000\u0026style=for-the-badge\u0026logo=openai\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e  \n   本项目由免费白嫖 GPT 的智囊 AI \u003ca href=\"https://zhinang.ai\" target=\"_blank\"\u003ehttps://zhinang.ai\u003c/a\u003e 技术支持\n\u003c/p\u003e\n\n--------\n\n\u003cp align=\"center\"\u003e\n    \u003ch2 align=\"center\"\u003e新版本：桌面应用\u003c/h2\u003e\n\u003c/p\u003e\n\n\u003e 您可使用桌面版来使用，一键监控、总结、发送。也可以使用脚本版，手动运行监控和总结。\n\n下载后直接打开配置 app key 即可运行监控和总结，一键总结，一键发送到群内。\n\n[下载地址（暂时只有 mac 版本）](https://github.com/aoao-eth/wechat-ai-summarize-bot/releases/tag/1.1.0)\n\n如您需要 windows 版本，可以自己构建或者直接代码运行，代码在 app 文件夹中，欢迎构建成功的同学提供 windows 安装包\n\n#### 截图\n功能：\n* 每日群聊监控和数据统计（界面上实时更新）\n* 一键总结，一键查看总结结果，一键发送到群聊\n* 聊天记录实时查看，直接发送内容到群聊\n* 随时更新的配置，可以配置截取的文本长度和结尾词等\n* 机器人状态监控，账号切换\n\n\n正常运行界面\n![image](https://github.com/aoao-eth/wechat-ai-summarize-bot/assets/897401/42857974-8463-4b2f-aba5-145db3d902d5)\n\n\n点击对话，可以看到实时的对话和对话记录，同时可以直接输入内容对话\n![image](https://github.com/aoao-eth/wechat-ai-summarize-bot/assets/897401/fa894592-a797-4d93-bc61-8e7c6482cc8a)\n\n\n微信登录界面\n![image](https://github.com/aoao-eth/wechat-ai-summarize-bot/assets/897401/f267d112-f4c8-4c52-a7d6-4d141a2d2823)\n\n\n\u003cp align=\"center\"\u003e\n    \u003ch2 align=\"center\"\u003e项目介绍\u003c/h2\u003e\n\u003c/p\u003e\n \n\n本项目是基于微信机器人的微信群聊总结助手，可以帮助群主或管理员自动收集群聊中的聊天记录，并使用 AI 进行总结，最终将其发送到指定的群聊中。\n\n\u003e 这可能是最简单配置可以把完整功能跑起来的项目，因为尝试了几个项目，都不是很能搞得定，所以用 JS 简单封装了下\n\n每次执行 summarize 命令都会生成三个总结文件，分别是：\n\n```\nxxx_sumarized.txt # 纯文本总结\nxxx_sumarized.png # 总结的图片\nxxx_sumarized.mp3 # 总结的语音\n```\n\n**提示：使用本项目登录微信可能存在封号的风险，请慎重使用并遵守相关平台的规则。使用本项目意味着您已经充分了解并接受这一风险。**\n\n## 脚本版本运行\n\n1. 安装依赖\n\n```bash\nnpm install\n```\n\n2. 设置 env 环境变量\n\n```bash\ncp .env.example .env\n```\n\n.env 中有`3`个变量，这`3`个变量中`DIFY_API_KEY`,`PADLOCAL_API_KEY`代表\n2个平台，`MONITOR_ROOMS`代表群组名称，接下来会分别介绍如何获取对应变量的值。\n\n3. 获取 PADLOCAL_API_KEY\n\n注册 http://pad-local.com 获取一个七天试用的账号，创建应用，然后在 .env 中填入 api key\n\n```bash\nPADLOCAL_API_KEY=puppet_padlocal_xxxxxx\n```\n\n4. 获取 DIFY_API_KEY\n\n注册 https://dify.ai 账号\n创建一个“文本生成”应用，创建完成后，在应用的“访问 api”菜单中，点击“api 秘钥”，点击生成新的秘钥 ，然后在 .env 中填入此秘钥\n\n```bash\nDIFY_API_KEY=xxxxxx\n```\n\n之后，在提示词编排中，在下拉框中选择模型“Claude-2”，平台免费送了一些免费的调用次数约 200 次，然后在 Prompt 内容中填入：\n\n```\n你是一个中文的群聊总结的助手，你可以为一个微信的群聊记录，提取并总结每个时间段大家在重点讨论的话题内容。\n\n请帮我将给出的群聊内容总结成一个今日的群聊报告，包含不多于10个的话题的总结（如果还有更多话题，可以在后面简单补充）。每个话题包含以下内容：\n- 话题名(50字以内，带序号1️⃣2️⃣3️⃣，同时附带热度，以🔥数量表示）\n- 参与者(不超过5个人，将重复的人名去重)\n- 时间段(从几点到几点)\n- 过程(50到200字左右）\n- 评价(50字以下)\n- 分割线： ------------\n\n另外有以下要求：\n1. 每个话题结束使用 ------------ 分割\n2. 使用中文冒号\n3. 无需大标题\n4. 开始给出本群讨论风格的整体评价，例如活跃、太水、太黄、太暴力、话题不集中、无聊诸如此类\n\n最后总结下今日最活跃的前五个发言者。\n\n以下是群聊内容\n{{input_content}}\n```\n\n注意，还需要将此参数的类型设置成 段落。\n\n点击右上角“发布”。\n![](./static/1.jpg)\n\n5. 设置 MONITOR_ROOMS\n```bash\nMONITOR_ROOMS=群名（目前只支持一个）\n```\n\n6. 设置支持命令触发总结的群名\n   在群内发送 /summarize 命令，即可触发总结\n\n```bash\n#仅限机器人账户发送\n/summarize\n```\n\n8. 运行微信监控程序\n\n```bash\nnpm run watch\n```\n\n此时会弹出一个二维码，使用微信扫码登录，登录成功后，程序将持续抓取所有群聊的聊天记录，聊天记录会保存在本地文件中，位置在 data/日期文件夹/群名.txt 中，不会上传到任何第三方。\n\n9. 手动运行总结程序\n   在每天结束的时候，手动对某个群的内容进行总结\n\n```bash\nnpm run summarize ./data/2023-08-23/xxx.txt\n```\n\n10. 总结语音生成的配置\n\n```bash\n# 添加以下两个配置即可开启语音生成\nAZURE_TTS_APPKEY=\nAZURE_TTS_REGION=\n```\n\n开通方式：azure 中的认知服务，找到 Speech 服务，开通后，找到密钥和区域，填入即可。每个月前 50W 字免费，基本不需要付费。\n\nhttps://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/SpeechServices\n\n\u003cp align=\"center\"\u003e\n    \u003ch2 align=\"center\"\u003e友情链接\u003c/h2\u003e\n\u003c/p\u003e\n\n- [智囊 AI] https://zhinang.ai/chat\n- [Dify.ai] https://dify.ai\n- [PadLocal] http://pad-local.com\n\n![Alt](https://repobeats.axiom.co/api/embed/09586a669359cc880471d7928d2512b6e262f76f.svg \"Repobeats analytics image\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmall-tou%2Fwechat-ai-summarize-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmall-tou%2Fwechat-ai-summarize-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmall-tou%2Fwechat-ai-summarize-bot/lists"}