1

Working with google actionsSDK and trying to figure out how can I include custom entities in the action package. I found here manual: https://developers.google.com/assistant/conversational/action-package/reference/QueryPatterns but this manual is short and they do not provide the way where should be custom types included.

Does any of you have experience with it?

Bjørson Bjørson
  • 1,583
  • 1
  • 17
  • 31
Markus Berg
  • 331
  • 2
  • 11

1 Answers1

1

Well yea, google documentation for actions SDK, no comment. Based on the example you provided these custom types belongs to the main structure in actions.json like:

"actions":[..],
"locale": "de",
"customTypes": [
    {
      "name": "$MorningOptions",
      "items": [
        {
          "key": "6am",
          "synonyms": [
            "6 am",
            "6 o clock",
            "oh six hundred",
            "6 in the morning"
          ]
        }
      ]
    }
  ]

If this is not working, you can try using types:

"actions":[..],
"locale": "de",
"types":
  [
    {
      "name": "$MorningOptions",
      "entities":
      [
        { "key": "6am", "synonyms": ["6 am","6 o clock","oh six hundred","6 in the morning"] }
      ]
    }
  ]

Those are also in the main structure. But officially are deprecated: https://developers.google.com/assistant/conversational/action-package/reference/rest/Shared.Types/ActionPackage#Type

Bjørson Bjørson
  • 1,583
  • 1
  • 17
  • 31
  • Thanks but I received an error: Unknown name "customTypes" at 'localized_action_packages[0].value': Cannot find field. – Markus Berg Apr 08 '20 at 09:30
  • yeap, this worked. On synchronization I haven`t received any issues. But I am not getting a params inside the intents. – Markus Berg Apr 08 '20 at 11:45
  • 1
    Yea, but parameters are received only at the start of the action, either by main intent or by other implicit invocation intent. Later in the conversation you will be getting only text and you have to use your own NLU solution. – Bjørson Bjørson Apr 09 '20 at 08:30