如果没有在bixby中提供城市名称,geo.NamedPoint将占据当前位置

问题描述 投票:0回答:1

我的话语是在纽约发生的事情。虽然训练我已将纽约设置为geo.SearchTerm并且在动作文件中,但我已将输入收集为cityName,类型为geo.NamedPoint。现在,如果我在问Birlin发生了什么,那么它给了我Bldin的NamedPoint但是如果我说的是“正在发生什么”而没有取得城市名称,那么这是第一次它给了我柏林的位置,第二次是给我当前的位置。我想要的是如果询问地点的问题然后给我位置详细信息,否则没有任何细节。如何实现?

这是我的行动档案

action (EventSearch) {
  type(Search)
  collect{
    input (dateTimeExpression) {
     type (MyDateTimeExpression)
     min (Optional)
    }

   input (cityName) {
     type (geo.NamedPoint)
     min (Optional) max (One)
     default-select {
       with-rule {
         select-first
      }
    }
  }
}
output (EventConfirmationResult) 
}
bixby bixbystudio
1个回答
2
投票

正如您在我的问题评论中提到的,您确实需要创建一个类似于the help center article中描述的DateTimeExpression结构的包装器,用于定义瞬态结构。

我还在下面显示了相关代码:

structure (CustomDateTimeExpression) {
  role-of (time.DateTimeExpression)
  description (wrapper for DateTimeExpression)
  features {
    transient
  }
}
© www.soinside.com 2019 - 2024. All rights reserved.