4

I'm currently trying to write a demo for actions on google using a rest web service.

At the moment the user opens the action ("talk to testaction") and is presented a welcome message (via the Main intent). This initial intent expects a user response and also sets the next expected intent via the possible_intents field in the JSON response

According to the documentation I should be able to specify a custom intent in possible_intents of my HTTP JSON response.

However, if I use any intent other than "assistant.intent.action.TEXT", once I respond to the initial intent / prompt, I get the following error:

Sorry, I did not understand.

And the response to the initial welcome intent is not properly routed to my service.

This does not work:

{
    "response": "...",
    "expectUserResponse": true,
    "conversationToken": "...",
    "audioResponse": "...",
    "debugInfo": {
        "agentToAssistantDebug": {
            "agentToAssistantJson": {
                "conversation_token": "...",
                "expect_user_response": true,
                "expected_inputs": [
                    {
                        "input_prompt": {
                            [...]
                        },
                        "possible_intents": [
                            {
                                "intent": "testintent"
                            }
                        ]
                    }
                ]
            }
        }
    }
}

This works:

{
    "response": "...",
    "expectUserResponse": true,
    "conversationToken": "...",
    "audioResponse": "...",
    "debugInfo": {
        "agentToAssistantDebug": {
            "agentToAssistantJson": {
                "conversation_token": "...",
                "expect_user_response": true,
                "expected_inputs": [
                    {
                        "input_prompt": {
                            [...]
                        },
                        "possible_intents": [
                            {
                                "intent": "assistant.intent.action.TEXT"
                            }
                        ]
                    }
                ]
            }
        }
    }
}

my testintent is properly defined in the actions package and works just fine if I call it directly.

Is it really only possible to use the generic TEXT intent and I then have to do all of the text-matching and intent recognition myself in code?

Wasda
  • 162
  • 7

1 Answers1

5

When using the Actions SDK, only the TEXT intent is supported. You have to use your own NLU to parse the raw text input provided by the user.

If you don't have your own NLU, then we recommend using API.AI.

Leon Nicholls
  • 4,623
  • 2
  • 16
  • 17
  • 1
    Thank you kindly for your response. Are there any future plans to provide NLU services after an initially triggered intent, i.e. matching intents other than TEXT to allow for intent-based dialog, via the Actions SDK? – Wasda Jan 04 '17 at 17:06
  • There are no plans to provide NLU with the Actions SDK. – Leon Nicholls Jan 05 '17 at 16:30
  • 2
    @LeonNicholls: Could you _please_ document this very clearly in the docs? I've now spent several days implementing a system that assumed that the ActionsSDK worked as documented (i.e., that any intent would be parsed), and I now have to throw it all out and switch to API.AI. – Lawrence Kesteloot Feb 01 '17 at 23:04
  • Document says that we can use custom intent for only first conversation. `For the first conversation turn, the intent will refer to the intent of the action that is being triggered. For subsequent conversation turns, the intent will be a built-in intent.` https://developers.google.com/actions/reference/rest/Shared.Types/AppRequest#Input – nonylene Nov 22 '17 at 17:28
  • @LeonNicholls what about adding a custom intent provided with action.json file, in possibleIntent in the above response ? – Shivam Gupta Jun 20 '18 at 05:40
  • 1
    Honestly it couldn't be more confusing when only the first conversation supports custom intents. But the next conversion followed by MAIN intent does not redirect it to the right one. So sad :-( – Ole K Jul 08 '19 at 18:50