This question is commonly asked when implementing input-view model.
Consider an utterance that request a person's name and age, during the input-view of age, developers may want to implement message as "hi [name], how old are you?". It seems difficult to do since the match pattern of input-view contains no concept of name.
The solution: Link these concept through the action. For example, the follow match pattern would allow access to any input concept to action named GetStructPerson. Read more about match pattern on our developer center.
match:IntAge(this){
to-input:GetStructPerson(action)
}
message{
template("Enter age of #{value(action.name)}")
}
Download and try the complete sample capsule on Github.
Utterance "list all name" -> click on John -> click "enter age" conversation driver will show the the following screenshot.
Comments
0 comments
Please sign in to leave a comment.