(Dialogflow) 如何将 Place API 中的地点信息存储到意图参数中?
(Dialogflow) How do I store the place info from Place API into intent parameters?
conv.ask(`Fetching your request...`);
conv.ask(new Image({
url: photo_request,
alt: 'Restaurant photo',
}))
conv.close(`Okay, the restaurant name is ` + name + ` and the address is ` + address + `. The following photo uploaded from a Google Places user might whet your appetite!`);
这部分代码仅在控制台上显示文本响应。我想将信息存储到意图的参数值中
您对话的参数属性用于 parameters Dialogflow 在您的用户短语中检测到的。这些属性是只读的,不能用于存储值。
如果您希望存储值供以后在对话中使用,您可以使用对话 context to do so. Saving data can be done by setting the parameter field on a context 对象。
conv.ask(`Fetching your request...`);
conv.ask(new Image({
url: photo_request,
alt: 'Restaurant photo',
}))
conv.close(`Okay, the restaurant name is ` + name + ` and the address is ` + address + `. The following photo uploaded from a Google Places user might whet your appetite!`);
这部分代码仅在控制台上显示文本响应。我想将信息存储到意图的参数值中
您对话的参数属性用于 parameters Dialogflow 在您的用户短语中检测到的。这些属性是只读的,不能用于存储值。
如果您希望存储值供以后在对话中使用,您可以使用对话 context to do so. Saving data can be done by setting the parameter field on a context 对象。