How to setup a more complicated 'IsList' parameter in Dialogflow

雨燕双飞 提交于 2019-12-11 16:24:44

问题


I've asked this question previously:

How to setup a complicated 'IsList' parameter in Dialogflow

In there I had this example:

"I want 7 apples, 8 oranges and 12 bananas"

So by setting up a 'Developer Composite Entity' that looks like this:

@sys.cardinal:Amount @Fruits:Fruit

I was able to solve my problem.

In there I'm using the @sys.cardinal system entity and my own custom @Fruits entity, which has a bunch of fruits in it.

I'm now looking for a way to handle examples like this:

"I want green apples, small oranges and cavendish bananas"

I then tried to make a new 'Developer Composite Entity' as follows:

@sys.any:Description @Fruits:Fruit

Now I'm using the @sys.any system entity instead of @sys.cardinal, but then I get this error:

"Do not use @sys.any in entities."

Is there any other way I can achieve this?

Help / Advice appreciated.


回答1:


Don't use "sys.any"

  1. Create a custom entity named "fruit-description" and add values like "small,cavendish,green etc." as many as you expect and also tick the "Allow automated expansions" Checkbox ,so any unexpected property which you have not mentioned is likely to be detected as a property.

  2. Also train agent after adding new utterances carrying this new entitiy "fruit-description".



来源:https://stackoverflow.com/questions/57889804/how-to-setup-a-more-complicated-islist-parameter-in-dialogflow

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!