Resource: EntityType
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.
When you define an entity, you can also include synonyms that all map to that entity. For example, "soft drink", "soda", "pop", and so on.
There are three types of entities:
System - entities that are defined by the Dialogflow API for common data types such as date, time, currency, and so on. A system entity is represented by the
EntityType
type.Custom - entities that are defined by you that represent actionable data that is meaningful to your application. For example, you could define a
pizza.sauce
entity for red or white pizza sauce, apizza.cheese
entity for the different types of cheese on a pizza, apizza.topping
entity for different toppings, and so on. A custom entity is represented by theEntityType
type.User - entities that are built for an individual user such as favorites, preferences, playlists, and so on. A user entity is represented by the
SessionEntityType
type.
For more information about entity types, see the Dialogflow documentation.
JSON representation |
---|
{ "name": string, "displayName": string, "kind": enum ( |
Fields | |
---|---|
name |
The unique identifier of the entity type. Required for |
display |
Required. The human-readable name of the entity type, unique within the agent. |
kind |
Required. Indicates the kind of entity type. |
auto |
Indicates whether the entity type can be automatically expanded. |
entities[] |
The collection of entity entries associated with the entity type. |
excluded |
Collection of exceptional words and phrases that shouldn't be matched. For example, if you have a size entity type with entry |
enable |
Enables fuzzy entity extraction during classification. |
redact |
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 during logging. |
Kind
Represents kinds of entities.
Enums | |
---|---|
KIND_UNSPECIFIED |
Not specified. This value should be never used. |
KIND_MAP |
Map entity types allow mapping of a group of synonyms to a canonical value. |
KIND_LIST |
List entity types contain a set of entries that do not map to canonical values. However, list entity types can contain references to other entity types (with or without aliases). |
KIND_REGEXP |
Regexp entity types allow to specify regular expressions in entries values. |
AutoExpansionMode
Represents different entity type expansion modes. Automated expansion allows an agent to recognize values that have not been explicitly listed in the entity (for example, new kinds of shopping list items).
Enums | |
---|---|
AUTO_EXPANSION_MODE_UNSPECIFIED |
Auto expansion disabled for the entity. |
AUTO_EXPANSION_MODE_DEFAULT |
Allows an agent to recognize values that have not been explicitly listed in the entity. |
ExcludedPhrase
An excluded entity phrase that should not be matched.
JSON representation |
---|
{ "value": string } |
Fields | |
---|---|
value |
Required. The word or phrase to be excluded. |
Methods |
|
---|---|
|
Creates an entity type in the specified agent. |
|
Deletes the specified entity type. |
|
Exports the selected entity types. |
|
Retrieves the specified entity type. |
|
Imports the specified entitytypes into the agent. |
|
Returns the list of all entity types in the specified agent. |
|
Updates the specified entity type. |