entity_types
Creates, updates, deletes, gets or lists an entity_types
resource.
Overview
Name | entity_types |
Type | Resource |
Id | google.dialogflow.entity_types |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_agents_environments_sessions_entity_types_get
- projects_locations_agents_sessions_entity_types_get
- projects_locations_agents_environments_sessions_entity_types_list
- projects_locations_agents_entity_types_get
- projects_locations_agents_sessions_entity_types_list
- projects_locations_agents_entity_types_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. The unique identifier of the session entity type. Format: projects//locations//agents//sessions//entityTypes/ or projects//locations//agents//environments//sessions//entityTypes/ . If Environment ID is not specified, we assume default 'draft' environment. |
entities | array | Required. The collection of entities to override or supplement the custom entity type. |
entityOverrideMode | string | Required. Indicates whether the additional data should override or supplement the custom entity type definition. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. The unique identifier of the session entity type. Format: projects//locations//agents//sessions//entityTypes/ or projects//locations//agents//environments//sessions//entityTypes/ . If Environment ID is not specified, we assume default 'draft' environment. |
entities | array | Required. The collection of entities to override or supplement the custom entity type. |
entityOverrideMode | string | Required. Indicates whether the additional data should override or supplement the custom entity type definition. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. The unique identifier of the session entity type. Format: projects//locations//agents//sessions//entityTypes/ or projects//locations//agents//environments//sessions//entityTypes/ . If Environment ID is not specified, we assume default 'draft' environment. |
entities | array | Required. The collection of entities to override or supplement the custom entity type. |
entityOverrideMode | string | Required. Indicates whether the additional data should override or supplement the custom entity type definition. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType. Format: projects//locations//agents//entityTypes/ . |
autoExpansionMode | string | Indicates whether the entity type can be automatically expanded. |
displayName | string | Required. The human-readable name of the entity type, unique within the agent. |
enableFuzzyExtraction | boolean | Enables fuzzy entity extraction during classification. |
entities | array | The collection of entity entries associated with the entity type. |
excludedPhrases | array | 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. |
kind | string | Required. Indicates the kind of entity type. |
redact | boolean | 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. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. The unique identifier of the session entity type. Format: projects//locations//agents//sessions//entityTypes/ or projects//locations//agents//environments//sessions//entityTypes/ . If Environment ID is not specified, we assume default 'draft' environment. |
entities | array | Required. The collection of entities to override or supplement the custom entity type. |
entityOverrideMode | string | Required. Indicates whether the additional data should override or supplement the custom entity type definition. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType. Format: projects//locations//agents//entityTypes/ . |
autoExpansionMode | string | Indicates whether the entity type can be automatically expanded. |
displayName | string | Required. The human-readable name of the entity type, unique within the agent. |
enableFuzzyExtraction | boolean | Enables fuzzy entity extraction during classification. |
entities | array | The collection of entity entries associated with the entity type. |
excludedPhrases | array | 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. |
kind | string | Required. Indicates the kind of entity type. |
redact | boolean | 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. |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
agentsId | string | |
entityTypesId | string | |
environmentsId | string | |
locationsId | string | |
projectsId | string | |
sessionsId | string | |
force | boolean | |
languageCode | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_agents_environments_sessions_entity_types_get
- projects_locations_agents_sessions_entity_types_get
- projects_locations_agents_environments_sessions_entity_types_list
- projects_locations_agents_entity_types_get
- projects_locations_agents_sessions_entity_types_list
- projects_locations_agents_entity_types_list
Retrieves the specified session entity type.
SELECT
name,
entities,
entityOverrideMode
FROM google.dialogflow.entity_types
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND environmentsId = '{{ environmentsId }}' -- required
AND sessionsId = '{{ sessionsId }}' -- required
AND entityTypesId = '{{ entityTypesId }}' -- required;
Retrieves the specified session entity type.
SELECT
name,
entities,
entityOverrideMode
FROM google.dialogflow.entity_types
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND sessionsId = '{{ sessionsId }}' -- required
AND entityTypesId = '{{ entityTypesId }}' -- required;
Returns the list of all session entity types in the specified session.
SELECT
name,
entities,
entityOverrideMode
FROM google.dialogflow.entity_types
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND environmentsId = '{{ environmentsId }}' -- required
AND sessionsId = '{{ sessionsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
Retrieves the specified entity type.
SELECT
name,
autoExpansionMode,
displayName,
enableFuzzyExtraction,
entities,
excludedPhrases,
kind,
redact
FROM google.dialogflow.entity_types
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND entityTypesId = '{{ entityTypesId }}' -- required
AND languageCode = '{{ languageCode }}';
Returns the list of all session entity types in the specified session.
SELECT
name,
entities,
entityOverrideMode
FROM google.dialogflow.entity_types
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND sessionsId = '{{ sessionsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
Returns the list of all entity types in the specified agent.
SELECT
name,
autoExpansionMode,
displayName,
enableFuzzyExtraction,
entities,
excludedPhrases,
kind,
redact
FROM google.dialogflow.entity_types
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND agentsId = '{{ agentsId }}' -- required
AND languageCode = '{{ languageCode }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_locations_agents_environments_sessions_entity_types_create
- projects_locations_agents_sessions_entity_types_create
- projects_locations_agents_entity_types_create
- Manifest
Creates a session entity type.
INSERT INTO google.dialogflow.entity_types (
data__name,
data__entityOverrideMode,
data__entities,
projectsId,
locationsId,
agentsId,
environmentsId,
sessionsId
)
SELECT
'{{ name }}',
'{{ entityOverrideMode }}',
'{{ entities }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}',
'{{ environmentsId }}',
'{{ sessionsId }}'
RETURNING
name,
entities,
entityOverrideMode
;
Creates a session entity type.
INSERT INTO google.dialogflow.entity_types (
data__name,
data__entityOverrideMode,
data__entities,
projectsId,
locationsId,
agentsId,
sessionsId
)
SELECT
'{{ name }}',
'{{ entityOverrideMode }}',
'{{ entities }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}',
'{{ sessionsId }}'
RETURNING
name,
entities,
entityOverrideMode
;
Creates an entity type in the specified agent. Note: You should always train a flow prior to sending it queries. See the training documentation.
INSERT INTO google.dialogflow.entity_types (
data__name,
data__displayName,
data__kind,
data__autoExpansionMode,
data__entities,
data__excludedPhrases,
data__enableFuzzyExtraction,
data__redact,
projectsId,
locationsId,
agentsId,
languageCode
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ kind }}',
'{{ autoExpansionMode }}',
'{{ entities }}',
'{{ excludedPhrases }}',
{{ enableFuzzyExtraction }},
{{ redact }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ agentsId }}',
'{{ languageCode }}'
RETURNING
name,
autoExpansionMode,
displayName,
enableFuzzyExtraction,
entities,
excludedPhrases,
kind,
redact
;
# Description fields are for documentation purposes
- name: entity_types
props:
- name: projectsId
value: string
description: Required parameter for the entity_types resource.
- name: locationsId
value: string
description: Required parameter for the entity_types resource.
- name: agentsId
value: string
description: Required parameter for the entity_types resource.
- name: environmentsId
value: string
description: Required parameter for the entity_types resource.
- name: sessionsId
value: string
description: Required parameter for the entity_types resource.
- name: name
value: string
description: >
The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType. Format: `projects//locations//agents//entityTypes/`.
- name: entityOverrideMode
value: string
description: >
Required. Indicates whether the additional data should override or supplement the custom entity type definition.
valid_values: ['ENTITY_OVERRIDE_MODE_UNSPECIFIED', 'ENTITY_OVERRIDE_MODE_OVERRIDE', 'ENTITY_OVERRIDE_MODE_SUPPLEMENT']
- name: entities
value: array
description: >
The collection of entity entries associated with the entity type.
- name: displayName
value: string
description: >
Required. The human-readable name of the entity type, unique within the agent.
- name: kind
value: string
description: >
Required. Indicates the kind of entity type.
valid_values: ['KIND_UNSPECIFIED', 'KIND_MAP', 'KIND_LIST', 'KIND_REGEXP']
- name: autoExpansionMode
value: string
description: >
Indicates whether the entity type can be automatically expanded.
valid_values: ['AUTO_EXPANSION_MODE_UNSPECIFIED', 'AUTO_EXPANSION_MODE_DEFAULT']
- name: excludedPhrases
value: array
description: >
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.
- name: enableFuzzyExtraction
value: boolean
description: >
Enables fuzzy entity extraction during classification.
- name: redact
value: boolean
description: >
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.
- name: languageCode
value: string
UPDATE
examples
- projects_locations_agents_environments_sessions_entity_types_patch
- projects_locations_agents_sessions_entity_types_patch
- projects_locations_agents_entity_types_patch
Updates the specified session entity type.
UPDATE google.dialogflow.entity_types
SET
data__name = '{{ name }}',
data__entityOverrideMode = '{{ entityOverrideMode }}',
data__entities = '{{ entities }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND sessionsId = '{{ sessionsId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
entities,
entityOverrideMode;
Updates the specified session entity type.
UPDATE google.dialogflow.entity_types
SET
data__name = '{{ name }}',
data__entityOverrideMode = '{{ entityOverrideMode }}',
data__entities = '{{ entities }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND sessionsId = '{{ sessionsId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
entities,
entityOverrideMode;
Updates the specified entity type. Note: You should always train a flow prior to sending it queries. See the training documentation.
UPDATE google.dialogflow.entity_types
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__kind = '{{ kind }}',
data__autoExpansionMode = '{{ autoExpansionMode }}',
data__entities = '{{ entities }}',
data__excludedPhrases = '{{ excludedPhrases }}',
data__enableFuzzyExtraction = {{ enableFuzzyExtraction }},
data__redact = {{ redact }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required
AND languageCode = '{{ languageCode}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
autoExpansionMode,
displayName,
enableFuzzyExtraction,
entities,
excludedPhrases,
kind,
redact;
DELETE
examples
- projects_locations_agents_environments_sessions_entity_types_delete
- projects_locations_agents_sessions_entity_types_delete
- projects_locations_agents_entity_types_delete
Deletes the specified session entity type.
DELETE FROM google.dialogflow.entity_types
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND environmentsId = '{{ environmentsId }}' --required
AND sessionsId = '{{ sessionsId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required;
Deletes the specified session entity type.
DELETE FROM google.dialogflow.entity_types
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND sessionsId = '{{ sessionsId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required;
Deletes the specified entity type. Note: You should always train a flow prior to sending it queries. See the training documentation.
DELETE FROM google.dialogflow.entity_types
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND agentsId = '{{ agentsId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required
AND force = '{{ force }}';
Lifecycle Methods
- projects_locations_agents_entity_types_export
- projects_locations_agents_entity_types_import
Exports the selected entity types.
EXEC google.dialogflow.entity_types.projects_locations_agents_entity_types_export
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required
@@json=
'{
"entityTypes": "{{ entityTypes }}",
"entityTypesUri": "{{ entityTypesUri }}",
"entityTypesContentInline": {{ entityTypesContentInline }},
"dataFormat": "{{ dataFormat }}",
"languageCode": "{{ languageCode }}"
}';
Imports the specified entitytypes into the agent.
EXEC google.dialogflow.entity_types.projects_locations_agents_entity_types_import
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@agentsId='{{ agentsId }}' --required
@@json=
'{
"entityTypesUri": "{{ entityTypesUri }}",
"entityTypesContent": "{{ entityTypesContent }}",
"mergeOption": "{{ mergeOption }}",
"targetEntityType": "{{ targetEntityType }}"
}';