View Source GoogleApi.ContentWarehouse.V1.Model.AttentionalEntitiesSemanticRoleId (google_api_content_warehouse v0.4.0)

Uniquely identifies a semantic role. When this role corresponds to a slot in a registered user intent (see go/assistant-intent-catalog), then the SemanticRoleId maps precisely onto that slot in the intent catalog. However, not all semantic roles corresponds to such user intent slots.

Attributes

  • intentId (type: String.t, default: nil) - Semantic roles will be defined locally, within the context of a single task/feature. The |intent_id| is a unique identifier for such a local cluster. In most cases, this should be exactly the same as the name of the intent used for TaskState (see go/assistant-intent-catalog). In cases where the intent isn't well-defined, this can be an arbitrary, feature-defined identifier.
  • roleId (type: String.t, default: nil) - Identifier for a semantic role, unique within the namespace of |intent_id|. When this role corresponds to a slot in the intent, the |role_id| should be equal to the name of that argument. For example, consider an entry in the intent catalog: core_intent { id { id: "BookARide" } slot { name: "provider" type { string_type { } } } slot { name: "num_riders" type { number_type { } } } } Then, the |role_id| would be "provider" or "num_riders" when referring to one of these slots. NOTE: when responding to the user, the Assistant may actually make use of other roles such as "ETA" or "driver" that are not part of the intent declaration. These should still be assigned consistent semantic roles. For example, a dialog with the Shopping feature: User: Where can I buy XYZ? Google: [Best Buy in Sunnyvale] has [XYZ] in stock. User: Great! Give me directions. In this case, both "Best Buy" and "XYZ" would be pushed to attentional entities. Best Buy, in this case, may not be an argument in the ShoppingItemStockInquiry intent, but should still have a consistent |role_id| such as "possessing_business".

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() :: %GoogleApi.ContentWarehouse.V1.Model.AttentionalEntitiesSemanticRoleId{
  intentId: String.t() | nil,
  roleId: String.t() | nil
}

Functions

@spec decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.