You can create custom entities for matching data specific to your agent.
For example, you could define a vegetable
entity type
that can match the types of vegetables
available for purchase with a grocery store agent.
Create custom entities
To create a custom entity:
Console
- Open the Dialogflow CX Console.
- Choose your GCP project.
- Select your agent.
- Select the Manage tab.
- Click Entity Types.
- Click Create.
- Enter entity data.
- Click Save.
API
Use the EntityType
's create
method.
Select a protocol and version for the EntityType reference:
Protocol | V3 | V3beta1 |
---|---|---|
REST | EntityType resource | EntityType resource |
RPC | EntityType interface | EntityType interface |
C++ | EntityTypesClient | Not available |
C# | EntityTypesClient | Not available |
Go | EntityTypesClient | Not available |
Java | EntityTypesClient | EntityTypesClient |
Node.js | EntityTypesClient | EntityTypesClient |
PHP | Not available | Not available |
Python | EntityTypesClient | EntityTypesClient |
Ruby | Not available | Not available |
Limitations
The following limitations apply:
- Custom entity type display names are unique for each agent.
Entity type display names should start with a letter
and can contain the following:
A-Z
,a-z
,0-9
,_
(underscore),-
(dash). Entity reference and synonym values have no such limitation.