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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
34
力技で実現する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
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
490
Embedded SREと共に達成した会員管理システムのAWS移行 - SRE NEXT 2026 ランチスポンサーセッション
niftycorp
PRO
0
1.1k
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
4.2k
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
240
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
180
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.8k
1B+ /day規模のログを管理する技術
broadleaf
0
130
Creating Composable Callables in Contemporary C++
rollbear
0
190
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
140
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
240
act1-costs.pdf
sumedhbala
0
170
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
280
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
750
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
250
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
190
Site-Speed That Sticks
csswizardry
13
1.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
170
The Curse of the Amulet
leimatthew05
2
13k
A Tale of Four Properties
chriscoyier
163
24k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
220
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!