Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
冴えてるBotの育てかた / cool_bot
Search
Jun Watanabe
December 22, 2016
Programming
3.6k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
冴えてるBotの育てかた / cool_bot
presented on #zohyomeetup vol.8
https://zohyo.connpass.com/event/44940/
Jun Watanabe
December 22, 2016
More Decks by Jun Watanabe
See All by Jun Watanabe
Jamf Connect ZTNAとMDMで実現! 金融ベンチャーにおける「デバイストラスト」実例と軌跡 / Kyash Device Trust
rela1470
1
1.1k
20分1発勝負! 社内Webツールをライブコーディングするぞ! / Live Coding PHPerKaigi 2025
rela1470
0
37
力技で実現するHR Driven Provisioningとアクセス制御の自動化 / kyash-hr-driven-provisioning
rela1470
0
1.5k
10分(25分)でつくる社内Webツール / howto-oidc-webpage
rela1470
0
180
リーグオブ情シス 第二回 / League of Infosys
rela1470
1
1.5k
Kyashでコーポレートエンジニアを初採用して7ヶ月が経ちましたがお元気ですか / ce-night-kyash
rela1470
4
3.3k
じこしょうかい2019 / rela1470-portfolio-2019
rela1470
0
410
255オクテットのドメインはツラみがある! / endless-work
rela1470
1
5.5k
ヤフーの1on1
rela1470
0
560
Other Decks in Programming
See All in Programming
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
140
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.7k
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
450
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
18k
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
560
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
170
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
200
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
670
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
140
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
760
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.9k
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
670
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
Designing for Timeless Needs
cassininazir
1
430
Google's AI Overviews - The New Search
badams
0
1.1k
Product Roadmaps are Hard
iamctodd
55
12k
30 Presentation Tips
portentint
PRO
1
360
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
460
Done Done
chrislema
186
16k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
490
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
First, design no harm
axbom
PRO
2
1.2k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
190
Transcript
ࡓ͑ͯΔ൴ঁͷҭ͔ͯͨ 2016/12/22 ࡶฌMeetUp #8 Jun Watanabe B o t
Jun Watanabe @rela1470 • ORATTA, Inc. Chief Engineer • PHPer
• ࠷ۙࣾΠϯϑϥ͔Γ • http://rela.red/
http://asuka-zero.jp/
ChatOps ͬͯ·͔͢?
ChatOps = DevOpsͷҰ෦ 110σϓϩΠग़དྷΕ৭ʑḿΔ! ࣮ݱͷͨΊ։ൃͱӡ༻ΛҰମԽ͠Α͏! ͍Ζ͍Ζۀվળ͠Α͏!
ChatOps ࡞ۀͷଐਓԽΛ͍͗ͨ! πʔϧͷઆ໌ॻ࡞ͱ͔େม! શ෦νϟοτͰग़དྷΔΑ͏ʹ͠Α͏!
ϝϦοτ • ͱΓ͔͚͋͑ͣ͠ΕͳΜͱ͔ͳΔͷ Ͱɺॳظֶशίετ͕গͳ͍ • νϟοτϩά=࡞ۀϩά άϧʔϓνϟο τͰͬͯݟ͑ΔԽ! • ࡞ۀ͕֤छπʔϧʹލ͍ͬͯͯҙࣝ͢
Δ͜ͱແ͘࡞ۀͰ͖Δ • εϚϗͰνϟοτ͕͑ΕOK
Slack App Directory
ORATTA ΦϦδφϧBot
None
σϓϩΠʹඞཁͳใ • ΞϓϦ໊ • ڥ໊(ຊ൪ or εςʔδڥ) • Git໊ •
ίϝϯτ
None
None
͍͍ͪͪฉ͔ΕΔͷ ໘͍͘͞!!
None
None
ͬͱ༥௨Λޮ͔ͤͯཉ͍͠!
Ͳ͏͢ΕΑ͍͔? BotͷධՁج४? νϡʔϦϯάςετ?
Beer Test
ͦͷBotͱҰॹʹ ҿΈʹߦ͖͍͔ͨ?
Ѫ͞ΕΔଘࡏʹͳΔͨΊʹ ͬͨ͜ͱ
1.ࡶஊର
Before
After
After
ͪΐͬͱͨ͠ฦͰخ͍͠!
ർΕͨͱ͖ʹ ༊ͯ͘͠ΕΔ
Docomo ࡶஊରAPI https://dev.smt.docomo.ne.jp/? p=docs.api.page&api_name=dialogue&p_name=api_1
BotKitͰͷ࣮ྫ var context = ''; var mode = 'dialog'; var
place = '౦ژ'; var options = { url: 'https://api.apigw.smt.docomo.ne.jp/dialogue/v1/dialogue?APIKEY=xxxxx', json: { utt: message.text, place: place, context: context, mode: mode } } //ϦΫΤετૹ৴ request.post(options, function (error, response, body) { context = body.context; mode = body.mode; bot.reply(message, body.utt); });
͠ΓͱΓ
ਓ֨3छྨ
ؔหϞʔυ
ͪΌΜϞʔυ
2.ࣗવݴޠೖྗղੳ
Before
After
After
ࣗવʹ͔͚͠Δ͚ͩͰ ༰Λཧղͯ͘͠ΕΔ
Microsoft LUIS Language Understanding Intelligent Service https://www.luis.ai/
Botʹ͔͚͠ΒΕΔ༰ ܗ͕༷ࣜʑ
ྫ) ϨΠϰͷϚελʔө͓ئ͍͠·͢ɻεςʔδ Ͱ͢ɻ ը૾ΛΞεΧZEROຊ൪ө͓ئ͍͠·͢ʘ (^o^)ʗ ϦιʔεϑΝΠϧΛΫϩఉͷຊ൪ʹσϓϩΠ͠ ͍ͯͩ͘͞! BLEACHͷϓϩάϥϜϓϩμΫτөOKͰ͢!
શͯʹରԠग़དྷΔΑ͏ͳ ਖ਼نදݱͱ͔...
શͯʹରԠग़དྷΔΑ͏ͳ ਖ਼نදݱͱ͔...
None
BotKitͰͷ࣮ྫ var massage_text = encodeURI(message.text); var url = 'https://api.projectoxford.ai/luis/v2.0/apps/xxx? subscription-key=xxx&verbose=true&q='
+ massage_text; request( url, function( error, response, body ){ if( !error && response.statusCode == 200 ){ console.dir(json[‘entities’]); } });
ฦΓྫ { "query": "ΞεΧͷεςʔδʹlibΛө͓ئ͍͠·͢ɻ༰৽ػೳͷөͰ͢ɻ", "topScoringIntent": { "intent": "σϓϩΠ", "score": 0.9743152
}, "intents": [ { "intent": "σϓϩΠ", "score": 0.9743152 }, { "intent": "None", "score": 0.005910686 } ], "entities": [ { "entity": "lib", "type": "git໊", "startIndex": 9, "endIndex": 11, "score": 0.889078 }, { "entity": "εςʔδ", "type": "ڥ໊", "startIndex": 4, "endIndex": 7, "score": 0.789255 }, { "entity": "ΞεΧ", "type": "ΞϓϦ໊", "startIndex": 0, "endIndex": 2, "score": 0.9694294 }, { "entity": "৽ػೳͷө", "type": "ίϝϯτ", "startIndex": 0, "endIndex": 2, "score": 0.9510122 } ] }
None
ͲͷՕॴ͕ Կͷཁૉͳͷ͔ ͔Ε ͋ͱਖ਼نදݱ
After
࠷ॳ ࠜؾΑ͘ ௐڭ͢Δ
LUISͰΈऔΕ ͳ͔ͬͨใ͚ͩ ฉ͍ͯ͋͛Δ
LUIS͕ࡶஊͩͱ அͨ͠Β ࡶஊରAPIʹ ͛Δ
Let’s Beer!