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

A SemanticType configures a value determined by another source, in particular another intent or a semantic frame. See go/unifying-intents and go/framery.

Attributes

  • allowAll (type: boolean(), default: nil) - If true, is compatible with a schema whose answer_type is any semantic_type including empty (since by default schemas return themselves as semantic_types (b/211438997). This is used primarily for slot composition. Example: for the slot name: Operand type { semantic_type { allow_all: true } entity_type {} } An entity_type or a schema with answer_type 'entity_type' can fill Operand. A schema with either (a) no answer_type or (b) answer_type with !semantic_type.names().empty() can fill Operand * A schema with answer_type 'date' CAN NOT fill Operand. Note that when there is an explicit answer_type, the 'self' semantic_type is not considered.
  • componentSpecificContracts (type: GoogleApi.ContentWarehouse.V1.Model.NlpMeaningComponentSpecificContracts.t, default: nil) - Contains data about the contracts that this ValueType level is available for. For more information see go/contract-based-conformance.
  • includesContainingIntent (type: boolean(), default: nil) - Determines whether or not the meaning schema that contains this semantic_type conforms to a function call with the name and arguments taken from the meaning schema. As it refers to the "containing_intent", this field should only be set in a semantic_type declared in an intent's type_members field. The behavior of this field is undefined in other cases, for example, declaring the type of an intent slot. On Assistant, we use meaning schemas for argument types to represent both function call values as well as a reusable tool to host other argument values (opaque types, normalized strings, subsets of entities) across intents. Teams need this information to run conformance checks and annotate new data. Example: If the intents below are in the intent catalog, then: - Intent(slot="some string") is conformant, because Type has string_type{} in its type_members. - Intent(slot=Type()) is not conformant, because Type has set semantic_type.includes_containing_intent to false. - Intent(slot=SubType()) is conformant, because type_members is not inherited. { id: "Intent" slot: { name: "slot" type: { semantic_type { name: "Type" }} } } { id: "Type" type_members { string_type{} semantic_type { includes_containing_intent: false } } } { id: "SubType" parent { id: "Type" relationship_type: SUBTYPE } }
  • name (type: list(String.t), default: nil) - Names of valid sources of the semantics (for example: a frame or an intent).
  • nameContracts (type: list(GoogleApi.ContentWarehouse.V1.Model.NlpMeaningSemanticTypeNameComponentSpecificContracts.t), default: nil) - Like name_remodelings, but for ComponentSpecificContracts instead of remodelings.
  • nameRemodelings (type: list(GoogleApi.ContentWarehouse.V1.Model.NlpMeaningSemanticTypeNameMeaningRemodelings.t), default: nil) - Contains data about current schema remodelings at the SemanticType name level. The "name" field contains all possible semantic type names and "semantic_type_name_remodelings" acts as an overlay to determine which ones to surface based on which schema remodeling IDs are requested. For more information see go/meaning-remodeling-framework.
  • remodelings (type: GoogleApi.ContentWarehouse.V1.Model.NlpMeaningMeaningRemodelings.t, default: nil) - Contains data about current schema remodelings at this ValueType lev©el. For more information see go/meaning-remodeling-framework.

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() :: %GoogleApi.ContentWarehouse.V1.Model.KnowledgeAnswersSemanticType{
  allowAll: boolean() | nil,
  componentSpecificContracts:
    GoogleApi.ContentWarehouse.V1.Model.NlpMeaningComponentSpecificContracts.t()
    | nil,
  includesContainingIntent: boolean() | nil,
  name: [String.t()] | nil,
  nameContracts:
    [
      GoogleApi.ContentWarehouse.V1.Model.NlpMeaningSemanticTypeNameComponentSpecificContracts.t()
    ]
    | nil,
  nameRemodelings:
    [
      GoogleApi.ContentWarehouse.V1.Model.NlpMeaningSemanticTypeNameMeaningRemodelings.t()
    ]
    | nil,
  remodelings:
    GoogleApi.ContentWarehouse.V1.Model.NlpMeaningMeaningRemodelings.t() | nil
}

Functions

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

Unwrap a decoded JSON object into its complex fields.