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
Alexa Skill開発を加速する ask-utils / vuilt-kyoto-5
Search
Hidetaka Okamoto
September 14, 2018
Technology
0
170
Alexa Skill開発を加速する ask-utils / vuilt-kyoto-5
vuilt kyoto vol.5のスライドです。
Hidetaka Okamoto
September 14, 2018
Tweet
Share
More Decks by Hidetaka Okamoto
See All by Hidetaka Okamoto
OpenAI APIで API Changelogを要約してみた話 / chatgpt-osaka-1
hideokamoto
0
590
コミュニティ運営から 中の人に変わって感じたこと
hideokamoto
0
82
Developerが Developer Advocateになった話 / dev-rel-meetup-tokyo-71
hideokamoto
0
330
Jamstack開発者のための App Runner入門
hideokamoto
1
480
WordPressでの webサイト制作2022 / ngk2022s
hideokamoto
0
430
JavaScript(TypeScript)で メディアサイトを インフラから構築する方法 / jsconf-jp-2021
hideokamoto
2
4.2k
AWS上でStripeを利用したアプリをより安全にデプロイする方法 /jaws-pankration-2021
hideokamoto
1
190
Shifter Headlessと Headless WordPressの紹介
hideokamoto
0
1.8k
Stripe & Next.js + AWS Amplify で会員 + 定期課金機能 / JP_Stripes20210903
hideokamoto
7
3.2k
Other Decks in Technology
See All in Technology
[MIRU2025]Preference Optimization for Multimodal Large Language Models for Image Captioning Tasks
keio_smilab
PRO
0
100
「AI駆動開発」のボトルネック『言語化』を効率化するには
taniiicom
1
210
データエンジニアがクラシルでやりたいことの現在地
gappy50
3
660
スプリントレビューを効果的にするために
miholovesq
9
1.7k
DatabricksのOLTPデータベース『Lakebase』に詳しくなろう!
inoutk
0
160
興味の胞子を育て 業務と技術に広がる”きのこ力”
fumiyasac0921
0
290
完璧を目指さない小さく始める信頼性向上
kakehashi
PRO
0
110
FAST導入1年間のふりかえり〜現実を直視し、さらなる進化を求めて〜 / Review of the first year of FAST implementation
wooootack
1
180
MCPに潜むセキュリティリスクを考えてみる
milix_m
1
880
2025/07/22_家族アルバム みてねのCRE における生成AI活用事例
masartz
2
140
Microsoft Learn MCP/Fabric データエージェント/Fabric MCP/Copilot Studio-簡単・便利なAIエージェント作ってみた -"Building Simple and Powerful AI Agents with Microsoft Learn MCP, Fabric Data Agent, Fabric MCP, and Copilot Studio"-
reireireijinjin6
1
150
東京海上日動におけるセキュアな開発プロセスの取り組み
miyabit
0
200
Featured
See All Featured
For a Future-Friendly Web
brad_frost
179
9.8k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
How to Think Like a Performance Engineer
csswizardry
25
1.8k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
BBQ
matthewcrist
89
9.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.5k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Scaling GitHub
holman
461
140k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
21
1.4k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Transcript
Alexa Skill։ൃΛՃ͢Δ ask-utils VUI LT Vol.5@Kyoto Ԭຊलߴ #VUILT
ࣗݾհ • Digitalcube Co. Ltd. • WordCamp Kyoto 2017࣮ߦҕ һ
• AWS Samurai 2017 H i d e t a k a O k a m o t o #VUILT
Amazon Alexa Japan User Group (AAJUG) https://aajug.connpass.com/ #VUILT
Alexa Day 2018 https://alexaday2018.jaws-ug.jp/ #VUILT
Alexa Champions https://developer.amazon.com/ja/alexa/champions/hidetaka-okamoto #VUILT
ઌʹએ ࣌ؒΦʔόʔͷؾΛײͨ͡ͷͰ #VUILT
11/3 JAWS FESTA 2018 OSAKA https://jft2018.jaws-ug.jp/ #VUILT
·͔͞ͷձ http://suitacityfootballstadium.jp/ #VUILT
ࠓհ͍ͨ͠ͷ https://www.npmjs.com/package/ask-utils #VUILT
ͳΜͰͭͬͨ͘ͷʁ #VUILT
ask-sdkͰͷΠϯςϯτϋϯυϥʔͷॻ͖ํ const HelpIntentHandler = { canHandle (handlerInput) { return handlerInput.requestEnvelope.request.type
=== 'IntentRequest' && handlerInput.requestEnvelope.request.intent.name === 'AMAZON.HelpIntent' }, handle (handlerInput) { const speechText = 'This is example skill' return handlerInput.responseBuilder .speak(speechText) .reprompt(speechText) .withSimpleCard(SKILL_NAME, speechText) .getResponse() } } #VUILT
͜͜Λຖճॻ͘ͷ͕Θ͔ͬͨ͠ const HelpIntentHandler = { canHandle (handlerInput) { return handlerInput.requestEnvelope.request.type
=== 'IntentRequest' && handlerInput.requestEnvelope.request.intent.name === 'AMAZON.HelpIntent' }, handle (handlerInput) { const speechText = 'This is example skill' return handlerInput.responseBuilder .speak(speechText) .reprompt(speechText) .withSimpleCard(SKILL_NAME, speechText) .getResponse() } } #VUILT
npm i -S ask-utils #VUILT
handlerInputͷதΛΑ͠ͳʹνΣοΫͯ͘͠ΕΔ const { canHandle } = require('ask-utils') const HelpIntentHandler =
{ canHandle (handlerInput) { return canHandle(handlerInput, 'IntentRequest', 'AMAZON.HelpIntent') }, handle (handlerInput) { const speechText = 'This is example skill' return handlerInput.responseBuilder .speak(speechText) .reprompt(speechText) .withSimpleCard(SKILL_NAME, speechText) .getResponse() } } #VUILT
ask-utilsͰมΘͬͨ͜ͱ • ୯७ʹίʔυΛॻ͘ྔ͕ݮͬͨ • VS Codeʹೖྗิ͋Δ͚Ͳɺͬͱָ͍ͨ͠ • ʮΑ͘ॻ͘ίʔυʯͷύοέʔδԽͰޮԽ • ask-sdkͷίʔυΛࢀߟʹ͢ΔͷͰɺษڧʹͳΔ
#VUILT
ask-utilsͰΑΓΑ͍VUXΛ #VUILT
Alexa blogʮฦࣄϥϯμϜʹͨ͠ํ͕ࣗવͬΆ͍Αʯ https://developer.amazon.com/ja/blogs/alexa/post/37e732b7-48fa-4940-9f12-9ffde7eeeaf8/alexa- skill-recipe-randomize-your-responses-to-add-variety-to-your-skill
getRandomMessage()ͰҰൃ const { getRandomMessage } = require('ask-utils') const errorMessages =
[ 'I can not here what you say, please say again.', 'Please say again.', "I'm sorry, please tell me again" ] const message = getRandomMessage(errorMessages) #VUILT
ϦΫΤετʹ͕͔͔࣌ؒΔ࣌ɺػίϯςϯπΛ https://developer.amazon.com/ja/docs/custom-skills/send-the-user-a-progressive-response.html
enqueueProgressiveResponseDirective()ͰҰൃ try { // ϓϩάϨογϒϨεϙϯεΛར༻͢Δ await enqueueProgressiveResponseDirective(handlerInput, ‘ݕࡧத') } catch
(err) { // τϥϒϧ͕ൃੜͯ͠ɺॲཧΛܧଓͤ͞Δɻ console.log(err) } // ֎෦ͷ API ͱଓ͢Δ const content = await get() return responseBuilder.speak(content).getResponse() #VUILT
aws-sdk & ask-utilsͰσʔλΛอଘ͢Δ const AWS = require('aws-sdk') const { getUserId
} = require('ask-utils') const dynamoDB = new AWS.DynamoDB.DocumentClient() const TableName = 'MyExampleDB' const SaveProfileHandler = { … async handle(handlerInput) { const userId = getUserId(handlerInput) const params = { TableName, Item: { id: userId, } } await dynamoDB.put(params).promise() ... } } #VUILT
aws-sdk & ask-utilsͰσʔλΛอଘ͢Δ const AWS = require('aws-sdk') const { getUserId
} = require('ask-utils') const dynamoDB = new AWS.DynamoDB.DocumentClient() const TableName = 'MyExampleDB' const SaveProfileHandler = { … async handle(handlerInput) { const userId = getUserId(handlerInput) const params = { TableName, Item: { id: userId, } } await dynamoDB.put(params).promise() ... } } #VUILT
aws-sdk & ask-utilsͰσʔλΛอଘ͢Δ const AWS = require('aws-sdk') const { getUserId
} = require('ask-utils') const dynamoDB = new AWS.DynamoDB.DocumentClient() const TableName = 'MyExampleDB' const SaveProfileHandler = { … async handle(handlerInput) { const userId = getUserId(handlerInput) const params = { TableName, Item: { id: userId, } } await dynamoDB.put(params).promise() ... } } #VUILT
ask-utilsͰͰ͖Δ͜ͱ • UserIDDeviceIDɺIntentNameͷऔಘ • ϓϩάϨογϒϨεϙϯεͷ࡞ • Displayαϙʔτঢ়گͷ֬ೝ • ςετ༻ͷMock Event࡞
• ͦͷ΄͔Զ͕ཉ͘͠ͳͬͨϔϧύʔؔ #VUILT
GitHubͰίʔυެ։ࡁΈ https://github.com/hideokamoto/ask-utils #VUILT
APIυΩϡϝϯτʢ֦ॆதʣ https://ask-utils.github.io/ask-utils/ #VUILT
Example࡞ͬͯΈͨ https://github.com/ask-utils/example #VUILT
ϨϏϡʔ ϓϧϦΫ ཁ ͬͨใࠂϒϩά ࠩ͠ೖΕ ͓·͍ͪͯ͠·͢ʂ #VUILT #VUILT
એ #VUILT
2018/10/08 (݄) 11:00ʙ17:00: ٕज़ॻయ̑ https://techbookfest.org/event/tbf05 #VUILT
AlexaεΩϧ։ൃͷ͍ΖΜͳTips·ͱΊͯ·͢ #VUILT
͓02 ʮΦϨ͕ͨͪΓ͔ͨͬͨΞϨΫαͷʯ https://techbookfest.org/event/tbf05/circle/27560001 #VUILT
9/18 Amazon Alexa Online Discussion #05 https://aajug.connpass.com/event/100409/ #VUILT
11/3 JAWS FESTA 2018 OSAKA εϐʔΧʔืूத https://jawsugosaka.doorkeeper.jp/events/79928 #VUILT
#VUILT