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
Google Assistant 対応アプリを作ってみた
Search
Tiny Mouse
April 26, 2018
Programming
0
540
Google Assistant 対応アプリを作ってみた
Mobile Act NAGOYA 2018/4/26
Tiny Mouse
April 26, 2018
Tweet
Share
More Decks by Tiny Mouse
See All by Tiny Mouse
今年がんばったこと
tinymouse
0
37
【LT会】インプット・アウトプットどうしてる?
tinymouse
0
23
今年がんばったこと
tinymouse
0
150
.NET MAUI+Blazor を使ってみた
tinymouse
0
140
【LT会】この技術書がすごい
tinymouse
1
160
蔵書管理アプリを作り直した
tinymouse
1
850
Windows アプリの開発手段の選択肢をまとめてみた
tinymouse
0
100
蔵書管理アプリを作りました
tinymouse
0
600
Google Apps Script アプリを配付する
tinymouse
0
92
Other Decks in Programming
See All in Programming
はじめての Go * WASM * OCR
sgash708
1
150
[JAWS DAYS 2025] 最近の DB の競合解決の仕組みが分かった気になってみた
maroon1st
0
230
令和トラベルにおけるコンテンツ生成AIアプリケーション開発の実践
ippo012
1
180
Domain-Driven Design (Tutorial)
hschwentner
13
22k
ローコードサービスの進化のためのモノレポ移行
taro28
1
200
良いコードレビューとは
danimal141
10
10k
ステートソーシング型イベント駆動の視点で捉えるCQRS+ES
shinnosuke0522
0
150
クックパッド検索システム統合/Cookpad Search System Consolidation
giga811
0
220
運用しながらリアーキテクチャ
nealle
0
310
機能が複雑化しても 頼りになる FactoryBotの話
tamikof
1
280
10년 개발한 프로젝트. 애자일 업무 조직에서 모듈화 했던 경험을 공유합니다.
winterlovedev
PRO
0
540
Boost Your Web Performance with Hyperdrive
chimame
1
210
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.6k
Unsuck your backbone
ammeep
669
57k
Mobile First: as difficult as doing things right
swwweet
223
9.5k
Git: the NoSQL Database
bkeepers
PRO
429
65k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
50
2.3k
A better future with KSS
kneath
238
17k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
The Pragmatic Product Professional
lauravandoore
32
6.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
Transcript
Tiny Mouse Google Assistant 対応 作 Mobile Act NAGOYA 2018/4/27
自己紹介 @tinymouse_jp SI 企業 SE 日曜
二児 父 静岡県浜松市出身 東京都品川区在住 名古屋市在住 Windows 愛用 iPhone Android Android 会浜松支部 Android 会 Tiny Mouse
Google Home 使
Google Home Mini 買
照明 消
作 Google Assistant 対応
Google Assistant 対応 動作
Google Assistant 対応 動作 Fulfillment
Amazon Alexa 対応 動作
None
Fulfillment hello •Training Phrase •Response 簡単 簡単
Fulfillment hello •Training Phrase •Response •Fulfillment Enable webhook call intentMap.set('hello',
sayHello); function sayHello(app) { app.tell(" "); } 動 動
Fulfillment let intentMap = new Map; intentMap.set('hello', sayHello); const {WebhookClient}
= require('dialogflow-fulfillment'); const agent = new WebhookClient({request, response}); function sayHello(agent) { agent.add(" "); } let actionMap = new Map; actionMap.set('hello_action', sayHello); const App = require('actions-on- google').DialogflowApp; const app = new App({request, response}); function sayHello(app) { app.tell(" "); } SDK v1 v2 移行 直後 自動生成
続 教
続 教 Fulfillment reqAbout •Training Phrase 教 •Parameters what @sys.any
•Parameters what @sys.any $what •Fulfillment Enable webhook call intentMap.set('reqAbout', sayAbout); function sayAbout(agent) { var what = agent.parameters.what; agent.add(what + " "); } 入力内容 渡 入力内容 渡
続 今日 運勢 大吉
続 今日 運勢 大吉 Fulfillment reqUnsei •Training Phrase 今日 運勢
•Response •Fulfillment Enable webhook call intentMap.set('reqUnsei', sayUnsei); function sayUnsei(agent) { agent.add("大吉 "); }
続 今日 運勢 大吉 Fulfillment reqUnsei •Training Phrase 今日 運勢
•Response •Fulfillment Enable webhook call intentMap.set('reqUnsei', sayUnsei); function sayUnsei(agent) { agent.setFollowupEvent({ name: 'say_unsei', parameters: { unsei: "大吉" } }); } 出力内容 渡 出力内容 渡 sayUnsei •Events say_unsei •Parameters unsei @sys.any #say_unsei.unsei •Response $unsei
作 忘 物 忘 物 携帯電話 財布
作 忘 物 忘 物 reqCheck •Training Phrase 忘 物
•Fulfillment Enable webhook call var list; var count; function startCheck(agent) { list = [ "携帯電話", "財布" ]; count = 0; agent.setFollowupEvent({ name: 'say_check', parameters: { item: list[cont] } }); } function sayCheck(agent) { count++; agent.setFollowupEvent({ .... 変数 値 保持 変数 値 保持 sayCheck •Events say_check •Parameters item @sys.any #say_check.item •Response $item 携帯電話 財布 sayCheck - yes •Training Phrase •Fulfillment Enable webhook call follow-up intent
作 忘 物 忘 物 reqCheck •Training Phrase 忘 物
•Fulfillment Enable webhook call function startCheck(agent) { var list = [ "携帯電話", "財布" ]; var count = 0; agent.setContext({ name: 'list', parameters: { value: list, count: count, item: list[count] } }); agent.setFollowupEvent('say_check); } function sayCheck(agent) { var context = agent.getContext('list'); var list = context.parameters.list; var count = context.parameters.count; .... 値 保持 値 保持 sayCheck •Events say_check •Context list •Parameters item @sys.any #list.item •Response $item 携帯電話 財布 sayCheck - yes •Training Phrase •Fulfillment Enable webhook call follow-up intent
作 忘 物 忘 物 reqCheck •Training Phrase 忘 物
•Fulfillment intentMap.set('reqCheck', startCheck); intentMap.set('startCheck - yes', sayCheck); intentMap.set('sayCheck - yes', sayCheck); function startCheck(agent) { ... agent.setFollowupEvent('start_check); } function sayCheck(agent) { ... agent.setFolloupEvent('say_check'); } startCheck •Events start_check 携帯電話 財布 startCheck - yes •Training Phrase •Fulfillment sayCheck •Events say_check sayCheck - yes •Training Phrase •Fulfillment 事前 名前 流 図 事前 名前 流 図
作 動 Google Assistant 対応
Google Assistant 対応 作