wechaty / summer

Summer of Wechaty (SoW) is a program for connecting students with the Wechaty community for coding & tech writing.
https://wechaty.github.io/summer-of-wechaty
Apache License 2.0
31 stars 12 forks source link

开发支持电信运营商 5G Chatbot / RCS 的 Wechaty 接入 Puppet 模块 #74

Open huan opened 3 years ago

huan commented 3 years ago

开源软件供应链点亮计划

“开源软件供应链点亮计划-暑期2021”(以下简称 暑期2021)是由中科院软件所与 openEuler 社区共同举办的一项面向高校学生的暑期活动,旨在鼓励在校学生积极参与开源软件的开发维护,促进国内优秀开源软件社区的蓬勃发展。

根据项目的难易程度和完成情况,参与者还可获取“开源软件供应链点亮计划-暑期2021”活动奖金和奖杯。

官网:https://summer.iscas.ac.cn

Wechaty

Wechaty 是一个开源聊天机器人框架SDK,具有高度封装、高可用的特性,支持NodeJs, Python, Go 和Java 等多语言版本。在过去的5年中,服务了数万名开发者,收获了 Github 的 9600 Star。同时配置了完整的DevOps体系并持续按照Apache 的方式管理技术社区。

项目名称

电信运营商商 5G Chatbot (RCS, Rich Communication Service) Puppet

背景介绍

Wechaty 社区目前已经支持微信、Whatsapp、企业微信、飞书等常见流行即时通讯工具,并且能够通过多语言 SDK (比如 Python Wechaty) 进行调用。

5G Chatbot (RCS) 是近期中国电信运营商基于 5G 的消息战略落地平台,未来的 5G 手机将会内置 RCS 消息的处理能力。

硬核桃社区电信运营商商5G Chatbot 平台。

我们在本次 Summer 2021 的项目中,Wechaty 希望可以实现对 RCS Chatbot 的支持。通过 Wechaty Puppet 的接口,可以将 RCS 协议封装成为 wechaty-puppet-5gmsg 供 Wechaty 开发者方便接入 RCS 平台,使其成为 Wechaty 可以使用的社区生态模块。

需求介绍

使用 https://github.com/wechaty/wechaty-puppet-official-account 项目作为模版,将核心代码文件 https://github.com/wechaty/wechaty-puppet-official-account/blob/master/src/puppet-oa.ts 中的微信公众平台调用,全部替换(封装)为 RCS 模块的调用。

这里有一个专门讲解如何开发 Wechaty Puppet Provider 的 workshop 视频,它以 wechaty-puppet-official-account 作为例子,做了从0到1的入门讲解:Wechaty Workshop for Puppet Makers: How to make a Puppet for Wechaty。通过观看这一个小时的视频,应该可以系统性的了解如何完成构建一个 Wechaty Puppet Provider 模块。

在初期开发中,能够实现文本消息的接收和发送,即可完成原型验证 POC 。

还可以参考以下链接:

  1. TypeScript Puppet Official Documentation: https://wechaty.github.io/wechaty-puppet/typedoc/classes/puppet.html
  2. Wechaty Puppet Specification: https://wechaty.js.org/docs/specs/puppet
  3. https://github.com/wechaty/wechaty-puppet-mock

项目难度

中(奖金:9000元)

导师联系方式

  1. 李佳芮: Wechaty co-creator, Founder & CEO of Juzi.BOT (rui@chatie.io)
  2. 康嘉: 硬核桃社区(https://www.5g-msg.com/) PM

项目产出目标

  1. 每日代码 commit
  2. 每周提交一份 report (回复本 issue)
  3. 每两周一次在线会议
  4. 发布 Git Repo wechaty-puppet-5g-msg
  5. 可以通过 Wechaty 加载 wechaty-puppet-5g-msg 模块,并通过 5G Chatbot / RCS 底层,实现文本消息的收发功能
  6. 提供一个 examples/ding-dong-bot.ts ,完成“接收到文字消息ding时,自动回复消息dong"的功能
  7. 配置 GitHub Actions 实现自动化测试* (可选)

项目技术栈

  1. TypeScript programming language
  2. Git
  3. REST API
  4. 5G Chatbot / Rich Communication Service
  5. 硬核桃社区 5G Chatbot SDK

Hello students!

We want Wechaty to be the universal instant messaging SDK on all IM platforms for chatbot makers to build their great conversational user interface, so while these are our ideas of what we think would make good projects for the summer, we're eager to hear your ideas and proposals as well.

Try us out and get to know the Wechaty code with examples!

Link to

What we want to do

Implement 5G Chatbot Puppet (Enable RCS Support for Wechaty wechaty/wishlist#53). The Puppet abstraction allows Wechaty to provide a consisting API on all IM platforms for build a chatbot. We are supporting WeChat, WeCom, Whatsapp already, and we want to support 5G Chatbots (Rich Communication Services, RCS) so that our developers can run their chatbots on 5G Phone to serve users from the phone RCS message.

Useful Links

zrn-fight commented 3 years ago

开发支持电信运营商 5G Chatbot / RCS 的 Wechaty 接入 Puppet 模块 一、详细方案

  1. 任务要求 通过 Wechaty Puppet 的接口,可以将 RCS 协议封装成为 wechaty-puppet-5gmsg 供 Wechaty 开发者方便接入 RCS 平台,使其成为 Wechaty 可以使用的社区生态模块。使用 https://github.com/wechaty/wechaty-puppet-official-account 项目作为模版,将核心代码文件 https://github.com/wechaty/wechaty-puppet-official-account/blob/master/src/puppet-oa.ts 中的微信公众平台调用,全部替换(封装)为 RCS 模块的调用。 在初期开发中,能够实现文本消息的接收和发送,即可完成原型验证 POC 。
  2. 实现方案 通过对Wechaty Puppet Provider,REST API以及5G Chatbot SDK等进行了解和学习,并对已有项目进行梳理,多和导师进行沟通,实现通过 Wechaty 加载 wechaty-puppet-5g-msg 模块,并通过 5G Chatbot / RCS 底层,实现文本消息的收发功能,提供一个 examples/ding-dong-bot.ts ,完成“接收到文字消息ding时,自动回复消息dong"等功能。 二.项目开发时间计划
  3. 第一阶段(7月-8月) 7.1-7.10 先和导师沟通,寻求导师的指导和建议,熟悉Wechaty Puppet Provider的业务流程,并对自己目前还没有掌握的技术栈REST API和5G Chatbot / Rich Communication Service进行快速的了解和学习,确定好详细的任务规划. 7.11-8.15 开始正式编码,先完成基础的功能,完成通过 Wechaty 加载 wechaty-puppet-5g-msg 模块,并通过 5G Chatbot / RCS 底层,实现文本消息的收发功能。每周需要进行复盘总结。
  4. 第二阶段(8月-10月) 在已有基础上完善后续功能,并进行总结。 8.16-9.30 继续完善功能,完成“接收到文字消息ding时,自动回复消息dong"的功能,不断总结和完善功能列表。 10.1-10.30 如果还有功能模块未完成则继续优化代码,梳理项目,如果时间充足,可以尝试完成一下配置 GitHub Actions 实现自动化测试的任务。 项目申请-{项目ID210220088}.zip
huan commented 3 years ago

@zrn-fight Thank you very much for submitting your proposal, I hope you can join the community and contribute the 5G Chatbot project soon!

zrn-fight commented 3 years ago

5G Chatbot开发计划

一.使用5G Chatbot接口,把基础的收发消息测通

1.了解和熟悉5g chatbot和接口技术规范

2.接入5g chatbot,进行编码和接口测试

3.进行接收和发送消息的测试

二.接入wechaty

1.了解和熟悉wechaty puppet的相关接口

2.将 RCS 协议封装成为 wechaty-puppet-5gmsg模块,实现文本消息 的收发功能

3.提供一个 examples/ding-dong-bot.ts ,完成“接收到文字消息ding时,自动回复消息dong"的功能

zrn-fight commented 3 years ago

[5G Chatbot] 进度报告

日期:2021-07-04

本周完成的成果

  1. 学习了5g chatbot的接口技术规范
  2. 学习了git的PR流程

    本周遇到的困难和需要配合的地方

  3. 服务器还没有配置好
  4. 不确定技术选型

    下周的开发计划和预计成果

  5. 完成初期博客,做好分工
  6. 配置好服务器,初步接入chatbot

    其他需要说明和同步的事项

    暂无

zrn-fight commented 2 years ago

[5g Chatbot] 进度报告

日期:2021-07-18

本周完成的成果

  1. 提交了期初博客
  2. 使用postman测试了部分上行接口
  3. 跟着博客https://github.com/wechaty/wechaty-getting-started在gitpod上运行了wechaty的入门项目

本周遇到的困难和需要配合的地方

  1. 不清楚如何配置服务器,走了很多弯路。

下周的开发计划和预计成果

  1. 尽快配置好域名解析,并将此域名作为回调地址用来测试下行消息。
  2. 学习 https://github.com/wechaty/wechaty-puppet-official-account的已有代码

其他需要说明和同步的事项

暂无

zrn-fight commented 2 years ago

[5g Chatbot] 进度报告

日期:2021-08-01

本周完成的成果

  1. 测通了5g消息上下行接口
  2. 对typescript进行了初步学习

本周遇到的困难和需要配合的地方

  1. 关于接口调用中遇到的问题已和导师沟通解决。

下周的开发计划和预计成果

  1. 尝试将核心代码文件 https://github.com/wechaty/wechaty-puppet-official-account/blob/master/src/puppet-oa.ts 中的微信公众平台调用,封装为 RCS 模块的调用。

其他需要说明和同步的事项

暂无

IronConrad commented 2 years ago
zrn-fight commented 2 years ago

项目信息

项目进度

zrn-fight commented 2 years ago

期中 Demo Day 视频

期中报告:https://youtu.be/vCV0ijD0R9g Live Code:https://youtu.be/qGl0zXtDL4s

lijiarui commented 2 years ago

Hi @zrn-fight Please upload to bilibili or Tencent as well, Thanks.

lijiarui commented 2 years ago

Please change as mid-term demo day request, and give us the deadline for the following things.

  1. Rename repo to: wechaty-puppet-walnut
  2. Move repo to GitHub Wechaty org: github.com/wechaty/wechaty-puppet-walnut
  3. Register a NPM account for preparing to publish the puppet NPM module
  4. Make the wechaty-puppet-walnut to be work-able with wechaty-getting-started
zrn-fight commented 2 years ago

Hi @zrn-fight Please upload to bilibili or Tencent as well, Thanks.

期中 Demo Day 视频 Youtu:

Bilibili:

zrn-fight commented 2 years ago

Hi, @lijiarui Is the repo moved to GitHub wechaty organization by issuing PR?

lijiarui commented 2 years ago

@zrn-fight

Click [Settings] and choose transfer as the following image shown

image

zrn-fight commented 2 years ago

[5g Chatbot] 进度报告

日期:2021-09-12

本周完成的成果

  1. 注册了npm账号
  2. 学习了Puppet Documentation,并继续修改wechaty-puppet-walnut项目中的bug

本周遇到的困难和需要配合的地方

  1. 短信应该是不需要扫码登录的,不知道如何连上puppet,可能是因为没有连上puppet导致了下面的第二条报错。
  2. 将5g消息的结构转化为puppet的消息结构时出现了值找不到的情况,在运行ding-dong-bot时报错如下: Cannot read property 'senderAddress' of undefined image

下周的开发计划和预计成果

  1. 继续修改bug,能正常运行ding-dong-bot

    其他需要说明和同步的事项

    我对短信登录时如何连上puppet这里很困惑,希望能得到老师的指导。

zrn-fight commented 2 years ago

结项 视频

Youtu:

Bilibili:

IronConrad commented 2 years ago

项目结项审核

初审导师:Conrad 康嘉 审核时间:2021-10-14 17:00:00 审核意见: