-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Wechaty Chatbot at OpenSource Factory #1175
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d96e19c
Create 2018-08-05-build-wechaty-chatbot-at-opensource-factory.md
gangena 5b59a2e
Update 2018-08-05-build-wechaty-chatbot-at-opensource-factory.md
gangena f3b47a0
pictures
gangena 3ee4661
Update 2018-08-05-build-wechaty-chatbot-at-opensource-factory.md
gangena b8f3ea5
Update 2018-08-05-build-wechaty-chatbot-at-opensource-factory.md
gangena 113e4f2
Merge branch 'master' into 0805
gangena ef61417
Update 2018-08-05-build-wechaty-chatbot-at-opensource-factory.md
huan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
jekyll/_posts/2018-08-05-build-wechaty-chatbot-at-opensource-factory.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: "Build Wechaty Chatbot at OpenSource Factory" | ||
author: tingyinhelen | ||
categories: announcement | ||
tags: | ||
- release | ||
- event | ||
- news | ||
image: /assets/2018/08-build-wechaty-chatbot-at-opensource-factory/000.webp | ||
--- | ||
|
||
## 尹婷:动手实现微信聊天机器人 | ||
|
||
{% include iframe.html src="https://youtu.be/Zgn2QDBENXk?list=PL8hd9KDTdarDXf_Rxtr8meKhxtgcXMInh" %} | ||
|
||
### Agenda | ||
|
||
- [00:00:05](https://youtu.be/Zgn2QDBENXk?list=PL8hd9KDTdarDXf_Rxtr8meKhxtgcXMInh&t=7) 尹婷的自我介绍 | ||
- [00:17:10](https://youtu.be/Zgn2QDBENXk?list=PL8hd9KDTdarDXf_Rxtr8meKhxtgcXMInh&t=103) 动手实现微信聊天机器人 | ||
- [00:03:32](https://youtu.be/Zgn2QDBENXk?list=PL8hd9KDTdarDXf_Rxtr8meKhxtgcXMInh&t=212) 加入群聊,展示机器人自动回复消息 | ||
- [00:05:40](https://youtu.be/6VhrXaT7clQ?list=PL8hd9KDTdarDXf_Rxtr8meKhxtgcXMInh&t=4943) 进入主题:chatbot | ||
- [00:09:40](https://youtu.be/Zgn2QDBENXk?list=PL8hd9KDTdarDXf_Rxtr8meKhxtgcXMInh&t=580) 为什么会选择Wechaty | ||
- [00:11:33](https://youtu.be/Zgn2QDBENXk?list=PL8hd9KDTdarDXf_Rxtr8meKhxtgcXMInh&t=693) 解释机器人代码 | ||
- [00:17:46](https://youtu.be/Zgn2QDBENXk?list=PL8hd9KDTdarDXf_Rxtr8meKhxtgcXMInh&t=1066) 机器人实现的原理 | ||
|
||
### App与Chatbot的利弊 | ||
|
||
![001](/assets/2018/08-build-wechaty-chatbot-at-opensource-factory/001.webp) | ||
|
||
人类就是在追寻更好的人机交互,从最开始人与人之间最直接的沟通,到电话沟通,到后面的互联网时代,pc,app也可以满足。 | ||
|
||
![002](/assets/2018/08-build-wechaty-chatbot-at-opensource-factory/002.webp) | ||
|
||
- 优势:平时我们使用app的时候,要去app商城下载一个app,再去注册一个账号,才能使用这个app,如果有10个需求就要下载十个app,非常占用硬盘,但是如果所有功能都集成在chatbot机器人上面,我们只需要告诉它一个指令,就会去调用相应的接口,给你传送相应的信息,这样就会方便很多,从2方面来解释: | ||
1.用户角度:我们平时用手机,百分之八九十的时间都用在了微信上面,所以对用户来说,如果微信能够满足我们大多数的需求,其实我们是不用去下载这些app的,比如现在的公众号,微信小程序,其实都是基于微信这种聊天工具,流量很多,受众很多,如果直接给予这个平台开发的话,起点会比从零开始做一个app起点高很多,因为微信本来有用户。 | ||
2.开发角度:开发一个app首先需要产品画一个原型,再设计交互,设计UI,把设计图给前端,前端来画页面,这是一般做app的流程,但是如果我们用chatbot做开发,其实不需要UI设计,直接把这一段开发成本省掉了。 | ||
- 弊端:虽然不用进行交互,但是要进行自然语言的设计。做自然语言处理其实是一个比较复杂的,如果想把比较零碎的语言提炼出来,获取想要的信息,去调接口,传给用户,训练成本很高。 | ||
以上是app和bot的优劣势。 | ||
|
||
### 解释机器人代码 | ||
|
||
- 实现原理: | ||
|
||
1. 网络抓包 | ||
2. 分析协议 | ||
3. 模拟协议 | ||
|
||
代码已经开源了,详情可以在<https://github.com/TingYinHelen>查看 | ||
|
||
### 为什么会选择Wechaty | ||
|
||
Wechaty是一个把个人微信账号做成机器人的框架,为什么会选择wechaty呢:首先我是一个前端程序员,比如有接收消息,好友请求这个类,API设计的很人性化,同时还提供了一些事件,可以直接通过监听这些事件调用它接口提供的方法来做一些操作。 | ||
Binary file added
BIN
+128 KB
jekyll/assets/2018/08-build-wechaty-chatbot-at-opensource-factory/000.webp
Binary file not shown.
Binary file added
BIN
+159 KB
jekyll/assets/2018/08-build-wechaty-chatbot-at-opensource-factory/001.webp
Binary file not shown.
Binary file added
BIN
+215 KB
jekyll/assets/2018/08-build-wechaty-chatbot-at-opensource-factory/002.webp
Binary file not shown.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to have ended suddenly, please make your blog richer.