问题
I am trying to build an intent using DialogFlow api.
Intent name: makePizza
Phases: ['I want to order pizza', 'I want to order small pizza']
Response: ['Your pizza is on its way']
After uploading the intent, it looks like this:
But if I make intent from the console and add phrase I want to order small pizza
it automatically detects that keyword small
is size parameter
:
size
entity is already added in the agent.
I understand that this can be achieved using below code:
training_phrases_parts = [
{
'type': 'EXAMPLE',
'parts': [
{'text': "i want to order "},
{'text': 'small', 'entity_type': '@size', 'alias': 'size'},
{'text': ' pizza'},
]
}]
But that is not doable for so many intents because there will be so many intents and their user phrases (which might or might not contains parameters). Please give suggestion to make this generic, i was not able to make it generic.
Is there any way to achieve this after the intents are uploaded to DialogFlow? Like detecting the entities from the user phrases? Or any other suggestion please!
Note 1: I tried to upload related parameters as well along with the intent, but that did not did the trick as well.
来源:https://stackoverflow.com/questions/52772894/not-able-to-extract-entities-from-user-phrases-when-uploading-intent-using-api