如何使geo.SearchRegion瞬态

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

我正在尝试编写一个胶囊,向用户询问geo.SearchRegion,并给他们提供获得结果后再次搜索的机会。

问题是,我需要在geo.LocalityName上训练语言模型(以获得城市名称)。我已经创建了自己的别名:

name (LocalityName) {
  description (alias of geo.LocalityName)
  extends (geo.LocalityName)
  features {
    transient
  }
}

效果很好。问题是,当我对geo.SearchRegion执行相同操作时,我失去了将LocalityNameSearchRegion匹配的内置功能。

structure (SearchRegion) {
  description (alias of geo.SearchRegion)
  extends (geo.SearchRegion)
  features {
    transient
  }
}

因此,当我执行以下评估操作时:

action (Evaluate) {
  description (Find the value)
  type (Search)
  collect {
    input (type) {
      type (StatsType)
      min (Required) max (One)
      default-init {
        intent {
          goal: GetAllTypes
        } 
      }
    }
    input-group (location) {
      requires (OneOf)
      collect {
        input (searchRegion) {
          type (geo.SearchRegion)
          min (Optional) max (One)
          default-select {
            with-learning
            with-rule {
              select-first
            }
          }
        }
        input (postalCode) {
          type (PostalCode)
          min (Optional) max (One)
          default-select {
            with-learning
            with-rule {
              select-first
            }
          }
        }
      }
    }
  }
  output (Result)
}

可以,但是不允许我重新进行搜索。当我将geo.SearchRegion更改为SearchRegion时,它不再起作用,因为它与位置名称不匹配。

我应该怎么做才能使用户再次搜索?

bixby
1个回答
0
投票

我建议在操作中将该输入更改为计算输入(Documentation),并将其提示行为定义为提示行为(AlwaysElicitation)。这将导致Bixby每次都要求用户提供位置。

© www.soinside.com 2019 - 2024. All rights reserved.