3

I want to make Bixby ask for input values when the user just states what he/she wants to do(without any valuable input given.)

For example,

user: I want to search something
Bixby: What do you want to search?
user: *possible-input-value*

Is this possible? If so, how can I implement this?

Lydia
  • 81
  • 3

3 Answers3

2

That's easy in Bixby. If you make an input to your action required...it will prompt the user for input. Let's say you have an action like this:

action (FindSomething) {
  type(Search)
  description (Search for something)

  collect {
    input (search) {
      type (Search)
      min (Required) max (One) // Force Bixby to prompt for an input.
    }
  }
  output (viv.core.Text) // some result
}

And you have a search concept defined like this:

name (Search)  {
  description (Search term)
}

You can provide an input view for the user to enter the term (via screen).

input-view {
  match: Search(search)

  message {
    template ("What do you want to search?")
  }

  render {
    form {
      elements {
        text-input {
          id (search)
          label (Search Term)
          type (Search)
          max-length (50)
          value ("#{raw(search)}")
        }
      }
      on-submit {
        goal: Search
        value: viv.core.FormElement(search)
      }
    }
  }

}

enter image description here

Pete Haas
  • 1,800
  • 1
  • 12
  • 15
1

In addition to Pete's response, you need to enable this for voice input (UI only input will not pass capsule review for submission to the marketplace). To do so, you need to create natural language training for Search

Since you are asking for input at a prompt, you need to create a training that will be used when prompting for Search

Training source for this would look like:

[g:Search:prompt] (sample search text)[v:Search]

Or in the UIenter image description here

Definitely check out the sample code at https://github.com/bixbydevelopers for more examples. A simple example of input would be in https://github.com/bixbydevelopers/capsule-sample-fact - note the training that uses tags

rogerkibbe
  • 358
  • 2
  • 10
0

In addition to Pete's response, I would recommend taking a look the design principles for Bixby development. These principles will guide you in making a targeted capsule that solves the use case you would like to address.

Ameya
  • 880
  • 6
  • 13