Bixby Developer Center

Guides
References

default-select

optional

Enables selection rules in your action using the with-rule key and selection learning with the with-learning key.

Note

If you have both selection learning and selection rules in your capsule, Bixby will only use selection rules in cases where selection learning does not make a decision.

Example

action (FindWeather) {
type (Search)
collect {
input (where) {
type (geo.NamedPoint)
min (Required) max (One)
// No auto-selecting in future, need a rule otherwise system will prompt
// Rule to select the first geo.NamedPoint from the list of candidates:
default-select {
with-rule {
select-first
}
}
}
input (when) {
type (time.DateTime)
min (Optional) max (One)
}
}
output (Weather)
}

** Example **

...
input (foo) {
type (my.type)
max (One)
default-select {
// enable selection learning using the 'with-learning' key
with-learning {
// add behaviors here
option (NoPreferences)
}

// add selection rules here
with-rule {
if (!exists(someOtherInput)) {
select-first {
sort-key { binding (bar) } // or blah.bar / this.bar
sort-key {....}
.
.
.
}
} else {
select-min {
expression (foo.score * foo.bar.priority)
}
}
}
}
}

Child Keys

with-learning
optional
Specifies to use selection learning, and optionally allows you to toggle some selection learning settings
with-rule
optional
Specifies rules to be used for default selections