小编Was*_*sda的帖子

ExpectedInputs/possible_intents仅适用于"assistant.intent.action.TEXT"?

我目前正在尝试使用其他网络服务在谷歌上编写动作演示.

用户打开动作时("与testaction对话")并显示欢迎消息(通过主要意图).此初始意图需要用户响应,并通过JSON响应中的possible_intents字段设置下一个预期意图

根据文档,我应该能够在HTTP JSON响应的possible_intents中指定自定义意图.

但是,如果我使用除"assistant.intent.action.TEXT"之外的任何其他意图,一旦我响应初始意图/提示,我就会收到以下错误:

对不起,我没听懂.

并且对最初欢迎意图的响应未正确地路由到我的服务.

这不起作用:

{
    "response": "...",
    "expectUserResponse": true,
    "conversationToken": "...",
    "audioResponse": "...",
    "debugInfo": {
        "agentToAssistantDebug": {
            "agentToAssistantJson": {
                "conversation_token": "...",
                "expect_user_response": true,
                "expected_inputs": [
                    {
                        "input_prompt": {
                            [...]
                        },
                        "possible_intents": [
                            {
                                "intent": "testintent"
                            }
                        ]
                    }
                ]
            }
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

这有效:

{
    "response": "...",
    "expectUserResponse": true,
    "conversationToken": "...",
    "audioResponse": "...",
    "debugInfo": {
        "agentToAssistantDebug": {
            "agentToAssistantJson": {
                "conversation_token": "...",
                "expect_user_response": true,
                "expected_inputs": [
                    {
                        "input_prompt": {
                            [...]
                        },
                        "possible_intents": [
                            {
                                "intent": …
Run Code Online (Sandbox Code Playgroud)

actions-on-google

4
推荐指数
1
解决办法
1124
查看次数

标签 统计

actions-on-google ×1