bixby

How to I add a select all training during selection prompt


One of the input prompt in Bixby is selection prompt and it is useful to select all items and continue with the action in some cases, for example, add all items to cart, send message to all members in a group.

How to ensure NL input "all" works during selection prompt?


Solution

  • The key steps are:

    1. duplicate the action that using the selection prompt, but comment out prompt-behavior (AlwaysElicitation)
    action (CreateListAll) {
      description (select all with prompt)
      type (Constructor)
      collect {
        input (itemnames) {
          type (Itemname)
          min (Optional) max (Many)
          // prompt-behavior (AlwaysElicitation)
        }
      }
      output (List)
    }
    
    1. link new action to the same JS file in endpoints
        action-endpoint (CreateList) {
          accepted-inputs (itemnames)
          local-endpoint (CreateList.js)
        }
        action-endpoint (CreateListAll) {
          accepted-inputs (itemnames)
          local-endpoint (CreateList.js)
        }
    
    1. add an "all" training with goal set to new action and as continuation of [selection prompt concept] enter image description here
    2. optional: add an "all" conversation driver in selection prompt. enter image description here