How does Bixby retain data from a previous NL input?

强颜欢笑 提交于 2020-01-06 02:12:21

问题


I don't understand the way Bixby retains data from previous NL Input. The following example uses the capsule capsule-sample-shirt.

  1. I first use the NL input find 2 medium shirts to get a list of shirts.
  2. I click on any of those (here i use the Collar Dress Shirt), and Bixby asks if I would want to buy it.
  3. I click No and Bixby informs me with a Okay, I won't do that.
  4. I now immediately run again the same NL input find 2 medium shirts and expect Bixby again to present me with the list of shirts, just like the first time. Instead of the expected list of shirts now, Bixby asks me again Are you sure you want to buy this? with the Collar Dress Shirt that I previously selected.

Why is Bixby not showing the list of shirts the second time find 2 medium shirts is given as NL input? What would need to happen to make Bixby show the list with this NL input after the first time?

List of shirts after NL Input: Bixby waits for confirmation: Bixby saying it canceled the prompt: Bixby doesn't show the list but instead immediately asks for confirmation:


回答1:


This is the AI part about Bixby.

Each conversation (utterance) without pressing the reset key is considered a continuation of last utterance (if any). Thus make the choice of Collar Dress and cancel it, but later ask to find 2 medium shirts again, Bixby will try to fill-in the blank with last choice user made.

One clear issue is that now has no way to change the type of shirt unless reset, but fix would be easy, make the image of shirt clickable and link actions in view model Confirmation.view.bxb

                image-card {
                  aspect-ratio (4:3)
                  image-url ("[#{value(item.shirt.images[0].url)}]")
                  title-area {
                    halign (Start)
                    slot1 {
                      text {
                        value ("")
                        style (Title_M)
                      }
                    }
                  }
                  // Add on-click here 
                }

You can add on-click similar to change the size and quantity

                    input-cell {
                      label ("Quantity")
                      value ("#{value(item.quantity)}")
                      on-click {
                        //This intent relies on searchTerm matching the item which is not a good practice, a better approach
                        //was to allow an ID as input to SelectItem and use `this.id` in the intent
                        intent {
                          goal {
                            UpdateOrder
                            @context (Continuation) { Order }
                          }
                          value { SearchTerm$expr(item.shirt.title) }
                          route { GetQuantity }
                        }
                      }
                    }

You may need to add other models to properly promote user.

Hope this will help, and have fun with Bixby!



来源:https://stackoverflow.com/questions/56242169/how-does-bixby-retain-data-from-a-previous-nl-input

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!