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
33
力技で実現するHR Driven Provisioningとアクセス制御の自動化 / kyash-hr-driven-provisioning
rela1470
0
1.5k
10分(25分)でつくる社内Webツール / howto-oidc-webpage
rela1470
0
170
リーグオブ情シス 第二回 / 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
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4k
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
5.3k
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
220
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
1.2k
Claspは野良GASの夢をみるか
takter00
0
180
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
120
RTSPクライアントを自作してみた話
simotin13
0
570
ふつうのFeature Flag実践入門
irof
7
3.7k
New "Type" system on PicoRuby
pocke
1
830
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
560
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
490
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
340
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
430
WCS-LA-2024
lcolladotor
0
630
4 Signs Your Business is Dying
shpigford
187
22k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Docker and Python
trallard
47
3.9k
Claude Code のすすめ
schroneko
67
230k
How to Ace a Technical Interview
jacobian
281
24k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
230
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
410
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
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!