MOPCON
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 如何從無到有變出 COSCUP 的 Google 助理動作並上架 - 陳慶耀 {%hackmd MNcuRlXoQDak0uCmtaJKwA %} ###### tags: `MOPCON 2019` ### 討論議題 使用Google助理實現一個應用程式:以COSCUP(開源人年會小幫手)為範例 ### 工具介紹 1) Google 助理 + 優點: + 支援多國語言 + 有各式各項硬體支援 ex.Google Home,mini,Nest Hub, etc. 2) Actions on google + 在 Google Assistant 上面的 APP => Action + 中譯名:動作 #### Google 助理應用的領域 + Smart Home + Home Control 3) Dialog flow + 自然語言(NLU)理解工具,下列為使用該工具所開發的應用: + 政治人物語錄 + 女僕小白 + 什麼是自然語言理解 NLU + 算是一個「連連看」的過程,也就是呈現出問題與該問題應該分類在什麼領域上。比如「IB 401 在哪邊?」這個就可以歸類在尋找教室的問題分類上。 4) Golang Server + 這邊會選擇使用 Golang 純粹是講者自己的喜好,若有開發上的需要也可以選擇自己擅長的程式語言來進行開發。 + 用途 + 透過 Context 第二次判斷意圖 + 管理 Session + 串接第三方 API 5) Sketch + 以視覺化的方式 做出輕易使用的系統流程 ### 意圖設計 + 在意圖設計中,主要以使用者動做為意圖的主題。如果意圖是有不同的主題,那麼就會額外分成另外種意圖,並不會有多個意圖合而為一的狀況。例如: + 找賣飯的餐廳 + 找賣麵的餐廳 + 找賣牛排的餐廳 ### 對話背景 (Context) Message + 回應訊息 => 自然語言生成 (NLG) >大部分是使用規則來建議意圖,沒有使用NLG來開發 + 引導使用者 => 催眠使用者 + + 主要原則:不要讓使用者有太開放的空間 + 誘導使用者 建議列表 (Suggestion chips) ### 流程設計 + 歡迎頁面 + 簡單的介紹自己是誰,可以做什麼。 + Call to Action 讓新使用者知道該怎麼進行下去。 > 主要是讓一個不知道該怎麼操作的使用者,可以藉由提示來讓使用者知道接下來要怎麼操作。 + 幫助頁面 + 詳細的介紹可以做什麼 + 可以動態做幾種不同的回應 + 通常使用者聽完這邊就會離開了 + 取得議程列表頁面 + 把接下來三場議程用表格列出 + 記錄使用者剛剛問的場地是 IB301 + 紀錄剛剛印出來的是哪三場 + 議程詳細頁面 + 提供重點資訊 + 提供網頁連結 + Call to Action => 加入最愛 > 缺點:只能用在手機上,在 Google Home 無法呈現。 + 新增列表頁面 + 意圖名稱是「新增到最愛列表」 + 回應的時候重用顯示列表的函式(function) + 在 Chip 的地方提示如何刪除議程 + 顯示完表格後補個問句 + 利用內容產生Chip > 沒以問句話結束,使用者會不知道麥克風是保持開啟的狀況。 + 查詢位置頁面 + 可以動態生成圖片 + Fallback + 提示對方自己是哪個動作 + 要清楚哪些意圖不用理會 + 有些問題即時是真人也不一定能回答 + 避免持續回覆同樣訊息是可以有效降低煩躁感 > 需注意時不時有使用者會~~搭訕~~用意外的問題來~~玩弄~~使用機器人。例如: > + 你有男朋友嗎?對不起我聽不懂你的意思,我還在學習。 > + 機器人不會回答的問題,次數不要太高 > 『逃避雖然可恥,但是有用』 + 離開意圖 + 判斷使用者打算離開動作 + 加入「我要找 Google 小姐」 + 假如整個過程都沒發生 Fallback,可以考慮邀請評分。 > 有禮貌的使用者,會使用離開意圖。 ### 流程設計 + 建議設計意圖 + 歡迎意圖 + 幫助意圖 + Fallback 意圖 + 離開意圖 ### 把意圖送入 Dialogflow > 一句話有很多種表達方式 > 範例句訓練能夠讓機器人理解更多不同意圖的表達方式 > 缺點:Google 的語音辨識在中文的辨識中可能會發生同音不同意的問題。 > 解法:這部分講者的解法是自行建立語音辭典的方式,等同於當特定字詞輸入進去如果有符合字詞,就以其對應的結果輸出。 ### 串接外部 API + COSCUP 本身有提供 Open API + 先確定資料更新頻率 + 設計清空快取的方式 #### 範例:實作意圖 [COSCUP/assistant](https://github.com/COSCUP/assistant/tree/master/fulfillment/src/github.com/COSCUP/assistant) ### 測試送審 + 隱私政策 + ICON + 簡介 + 清楚描述技能(必須) + 被退回的狀況 + 麥克風忘記關 + 使用者不知道結束 ### Debug + 把 Request 直接 Dump 出來(推薦) + 參考 Dialogflow 官方文件 + 參考 Actions on Google 官方文件 + stackdriver + [Google 助理動作開發 臉書群組](https://m.facebook.com/groups/2107993355983314/) + r/GoogleAssistantDev + try-and-error [TIH 的粉絲團](https://www.facebook.com/TIH.tw/)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully