Entities are extracted from user input and represent parameters that are meaningful to your application. For example, a date range, a proper name such as a geographic location or landmark, and so on. Entities represent actionable data for your application.
To get more information about EntityType, see:
resource "google_dialogflow_cx_agent" "agent" {
display_name = "dialogflowcx-agent"
location = "global"
default_language_code = "en"
supported_language_codes = ["fr","de","es"]
time_zone = "America/New_York"
description = "Example description."
avatar_uri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"
enable_stackdriver_logging = true
enable_spell_correction = true
speech_to_text_settings {
enable_speech_adaptation = true
}
}
resource "google_dialogflow_cx_entity_type" "basic_entity_type" {
parent = google_dialogflow_cx_agent.agent.id
display_name = "MyEntity"
kind = "KIND_MAP"
entities {
value = "value1"
synonyms = ["synonym1","synonym2"]
}
entities {
value = "value2"
synonyms = ["synonym3","synonym4"]
}
enable_fuzzy_extraction = false
}
The following arguments are supported:
display_name
-
(Required)
The human-readable name of the entity type, unique within the agent.
kind
-
(Required)
Indicates whether the entity type can be automatically expanded.
KIND_MAP
, KIND_LIST
, KIND_REGEXP
.entities
-
(Required)
The collection of entity entries associated with the entity type.
Structure is documented below.
value
-
(Optional)
The primary value associated with this entity entry. For example, if the entity type is vegetable, the value could be scallions.
For KIND_MAP entity types: A canonical value to be used in place of synonyms.
For KIND_LIST entity types: A string that can contain references to other entity types (with or without aliases).
synonyms
-
(Optional)
A collection of value synonyms. For example, if the entity type is vegetable, and value is scallions, a synonym could be green onions.
For KIND_LIST entity types: This collection must contain exactly one synonym equal to value.
auto_expansion_mode
-
(Optional)
Represents kinds of entities.
AUTO_EXPANSION_MODE_DEFAULT
, AUTO_EXPANSION_MODE_UNSPECIFIED
.excluded_phrases
-
(Optional)
Collection of exceptional words and phrases that shouldn't be matched. For example, if you have a size entity type with entry giant(an adjective), you might consider adding giants(a noun) as an exclusion.
If the kind of entity type is KIND_MAP, then the phrases specified by entities and excluded phrases should be mutually exclusive.
Structure is documented below.
enable_fuzzy_extraction
-
(Optional)
Enables fuzzy entity extraction during classification.
redact
-
(Optional)
Indicates whether parameters of the entity type should be redacted in log. If redaction is enabled, page parameters and intent parameters referring to the entity type will be replaced by parameter name when logging.
parent
-
(Optional)
The agent to create a entity type for.
Format: projects/
language_code
-
(Optional)
The language of the following fields in entityType:
EntityType.entities.value
EntityType.entities.synonyms
EntityType.excluded_phrases.value
If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
The excluded_phrases
block supports:
value
-
(Optional)
The word or phrase to be excluded.In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format {{parent}}/entityTypes/{{name}}
name
-
The unique identifier of the entity type.
Format: projects/
This resource provides the following Timeouts configuration options:
create
- Default is 40 minutes.update
- Default is 40 minutes.delete
- Default is 20 minutes.EntityType can be imported using any of these accepted formats:
{{parent}}/entityTypes/{{name}}
{{parent}}/{{name}}
In Terraform v1.5.0 and later, use an import
block to import EntityType using one of the formats above. For example:
import {
id = "{{parent}}/entityTypes/{{name}}"
to = google_dialogflow_cx_entity_type.default
}
When using the terraform import
command, EntityType can be imported using one of the formats above. For example:
$ terraform import google_dialogflow_cx_entity_type.default {{parent}}/entityTypes/{{name}}
$ terraform import google_dialogflow_cx_entity_type.default {{parent}}/{{name}}