shortQuestion
shortQuestion

Reputation: 493

google action package how to define custom slot types?

Hi this is a question about: google home, action sdk, gactions.exe

at https://developers.google.com/actions/reference/rest/Shared.Types/QueryPatterns Are so called query pattern with custom types but when I try to add them to my action.json and than update via gaction it always says customTypes is an unknown Parameter.

Does someone have an working example with ApiVersion: 2 ?

Is there somewhere in general an larger example of this json. To better see how all works together? After 2 hours research I cant find anything.

Thanks and best regards

Update: EDIT that works BUT only as intent to start the Skill/APP not inside the APP

Its Still not change the Speech to text.

edit: that work:

 {
      "actions": [
        {
          "description": "Default Welcome Intent",
          "name": "MAIN",
          "fulfillment": {
            "conversationName": "cloud fleet manager"
          },
          "intent": {
            "name": "actions.intent.MAIN",
            "trigger": {
              "queryPatterns": [
                "talk to cloud fleet manager",
                "welcome at cloud fleet manager",
                "ask cloud fleet manager"
              ]
            }
          }
        },
        {
          "description": "first text Intent",
          "name": "hallo2",
          "fulfillment": {
            "conversationName": "cloud fleet manager"
          },
          "intent": {
            "name": "com.cfm.hallo2",
            "trigger": {
              "queryPatterns": [
                "(hello)? to cloud fleet manager",
                "hallo $Test:text cloud fleet manager"
              ]
            },
            "parameters": [
              {
                "name": "text",
                "type": "Test"
              }
            ]
          }
        }
      ],
      "types": [
        {
          "name": "$Test",
          "entities": [
            {
              "key": "bmw",
              "synonyms": [
                "B M W"
              ]
            },
            {
              "key": "benz",
              "synonyms": [
                "benz"
              ]
            }
          ],
          "isUserDefined": false
        }
      ],
      "conversations": {
        "cloud fleet manager": {
          "name": "cloud fleet manager",
          "url": "https://a69fa73a.ngrok.io/google",
          "fulfillmentApiVersion": 2
        }
      }
    }

https://drive.google.com/drive/folders/0B8G3pDr3aWiwZjU1akREdTZNQ1U

Upvotes: 2

Views: 803

Answers (2)

shortQuestion
shortQuestion

Reputation: 493

If you have custom slots like names of People or Ships.

To get Custom Words like names. Correctly matched I found that the adding of speech bias hints is working quite well.

You can find informations here:

https://developers.google.com/actions/reference/rest/Shared.Types/AppResponse#Suggestion

Upvotes: 0

shortQuestion
shortQuestion

Reputation: 493

I got it after two days more trying and reading.

At first I forgot one dollar sign. Secondly user defined intents in action.json package are only working as start trigger.

And with a larger set of names it seems like this types dont change anything at the Speech to text model.

So dtrange names like "Moreton Bay" is still not correctly recognized when its in the type field. And need to be figured out with very difficult Text parsing later.

Upvotes: 1

Related Questions