gpt4 book ai didi

dialogflow-es - Actions on Google - 位置权限

转载 作者:行者123 更新时间:2023-12-04 02:04:18 26 4
gpt4 key购买 nike

如何使用 webhook 请求设备位置,以及在 google v2 上的操作。

以前,我使用 permission_request 字段,但现在已弃用,并且不确定它在响应对象中的位置。

json 响应

{
speech: "",
displayText: "",
data: {
google: {
expectUserResponse: true,
noInputPrompts: [
{
textToSpeech: "Hello McFly!"
},
{
textToSpeech: "Good talk, Russ"
},
{
textToSpeech: "Alright, I'm just gonna go over here and hang out. Let me know if there is anything else I can do for you."
}
],
richResponse: {
items: [
{
simpleResponse: {
textToSpeech: "Testing",
ssml: "<speak >Testing</speak>",
displayText: "Testing"
},
basicCard: null
}
],
suggestions: [ ],
linkOutSuggestion: {
destinationName: null,
url: null
}
},
systemIntent: null,
possibleIntents: [
{
intent: "actions.intent.PERMISSION",
inputValueData: {
@type: "type.googleapis.com/google.actions.v2.PermissionValueSpec",
optContext: "To provide weather information for you.",
permissions: [
"DEVICE_COARSE_LOCATION"
]
}
}
]
}
},
contextOut: [ ],
source: "Abbi"
}

最佳答案

所以我需要将权限请求添加为系统意图,而不是预期的意图或可能的意图。

下面的 json 现在可以工作了

{
speech: "",
displayText: "",
data: {
google: {
expectUserResponse: true,
noInputPrompts: [
{
textToSpeech: "Hello McFly!"
},
{
textToSpeech: "Good talk, Russ"
},
{
textToSpeech: "Alright, I'm just gonna go over here and hang out. Let me know if there is anything else I can do for you."
}
],
richResponse: {
items: [
{
simpleResponse: {
textToSpeech: "",
ssml: "<speak ></speak>",
displayText: ""
},
basicCard: null
}
],
suggestions: [ ],
linkOutSuggestion: {
destinationName: null,
url: null
}
},
systemIntent: {
intent: "actions.intent.PERMISSION",
data: {
@type: "type.googleapis.com/google.actions.v2.PermissionValueSpec",
optContext: "To provide an accurate experience, ",
permissions: [
"DEVICE_PRECISE_LOCATION"
],
carouselSelect: null
}
}
}
},
contextOut: [ ],
source: "Abbi"
}

关于dialogflow-es - Actions on Google - 位置权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44766622/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com