iT邦幫忙

2019 iT 邦幫忙鐵人賽

DAY 26
0
AI & Data

Voice App 開發實務:使用Diagflow+firebase開發Google home App (google assistant action)系列 第 26

actions-on-google 建置 Google Home App #25 dialogflow api 動態建model

這個就厲害了,一路跟著我們學習過來的朋友,一定了解,我們的model得在dialogflow的console上面做訓練,才能做使用。
但 dialogflow的sdk 讓邊訓練邊使用,變的可能。
Yes

沒錯,是真的.

參考
https://github.com/googleapis/nodejs-dialogflow

const createIntentRequest = {
    parent: agentPath,
    intent: intent,
  };

  // Create the intent
  intentsClient
    .createIntent(createIntentRequest)
    .then(responses => {
      console.log(`Intent ${responses[0].name} created`);
    })
    .catch(err => {
      console.error('ERROR:', err);
    });
  // [END dialogflow_create_intent]
}

這是節錄Create Intent範例中的一段,只要照這個,就可以動態新增intent。

也就是說例如你有個 home bot ,本來你要開電燈,開空調,要分開講兩次。

你現在可以設計一個能動態訓練自已的bot,要求這個bot將動作合一。


上一篇
actions-on-google 建置 Google Home App #24 Transactions 交易
下一篇
actions-on-google 建置 Google Home App #26 Make your agent multilingual
系列文
Voice App 開發實務:使用Diagflow+firebase開發Google home App (google assistant action)31
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言