[英]Watson Conversation: Show user all entities
In Watson conversation. 在Watson对话中。 I have an entity Fruit
我有实体水果
Fruit values:
-Apple
-Orange
-Banana
-Kiwi
I'd like to create a new dialog where the intent of the user is to get a list of all the values of a specific entity, in this case a list of all the fruits, . 我想创建一个新对话框,用户的意图是获取特定实体的所有值的列表,在本例中为所有水果的列表。 So the conversation should go:
因此对话应该进行:
User: "What fruits do you have?"
And then I'd like Watson to respond 然后我希望沃森做出回应
Watson: "The fruits we got in store are: Apple, Orange, Banana, Kiwi"
All the stuff I found is of recognizing an entity in users input, such as 我发现的所有内容都是在用户输入中识别实体,例如
User: "Do you have apples?"
And Watson picking up Apples 沃森拿起苹果
Just to clarify , setting an array with the possible options declarativly on a context variable as shown below is no good for me, I need to get them dynamically from the entity 只是澄清一下,如下所示,在上下文变量上声明一个带有可能选项的数组对我没有好处,我需要从实体中动态获取它们
{
"context": {
"fruits": [
"lemon",
"orange",
"apple"
]
},
"output": {
"text": {
"values": [
"This is the array: <? $fruits.join(', ') ?>"
],
"selection_policy": "sequential"
}
}
}
Thankss! Thankss!
AFAIK it is not possible to directly access the workspace metadata from within a dialog. AFAIK无法从对话框中直接访问工作空间元数据。 You have access to what was detected using the intents, entities and context variables.
您可以访问使用Intent,实体和上下文变量检测到的内容。 However, I see two options you have:
但是,我看到您有两个选择:
. 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.