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
2.6k
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
420
255オクテットのドメインはツラみがある! / endless-work
rela1470
1
5.5k
ヤフーの1on1
rela1470
0
570
Other Decks in Programming
See All in Programming
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
310
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
700
Google Apps Script で Ruby を動かす
kawahara
0
260
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
5
1.9k
源内ハンズオン概要編
hideg
0
190
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
4
460
Foundation Models frameworkで画像分析
ryodeveloper
1
620
What's New in Android 2026
veronikapj
0
260
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
330
the container ship “Apple Silicon”@WWDC26 Recap -Japan-\(region).swift
shingangan
0
130
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
1
1k
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.8k
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
300
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
430
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Facilitating Awesome Meetings
lara
57
7.1k
Being A Developer After 40
akosma
91
590k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
530
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
390
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
The untapped power of vector embeddings
frankvandijk
2
1.8k
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!