Google Assistant

Integration published by Jovo | 37,793 downloads

Build apps for Google's Assistant platform

Response

Introduction

The response is the data that you send to the platform after processing the request. It consists of information like:

  • output, e.g. speech, audio, etc.
  • permission requests,
  • or session data

Here's an example response:

The main component is the output. Besides the platform independent output, Google Assistant provides multiple other types of output. You can find out more about that in Interfaces section of the documentation.

$response Object

The $response object supports a handful of cross-platform helper methods to get/set its values. You can find them in the general response docs.

Besides that, Google Assistant supports the following getter methods:

Name Description Return Value
getBasicCard() Returns the response's basic card object. basic card object or undefined
getDisplayText() Returns the response's display text. string or undefined
getMediaResponse() Returns the media response object object or undefined
getSuggestionsChips() Returns the response's suggestion chips array. array or undefined
hasDisplayText() Returns true if the response contains a display text. If you parse a string, the method will only return true if the string and the display text value are equal. boolean
hasImageCard(title?: string, content?: string, imageUrl?: string) Returns true if the response contains an image card. If you parse any of the cards properties, the method will only return true if they are equal to the ones in the response. boolean
hasSimpleCard(title?: string, content?: string) Returns true if the response contains a simple card. If you parse any of the cards properties, the method will only return true if they are equal to the ones in the response. boolean
hasSuggestionChips(chips?: string[]) Returns true if the response contains suggestion chips. If you parse an array of strings, the method will only return true if the suggestion chip's title are equal to the parsed array's values (same order) boolean

Google Assistant Changelog

Current version might be higher than the latest changes displayed below because of updates of dependencies.

3.0.12 (2020-04-09)

🐛 Bug Fix

  • #716 Corrected logic for retrieving project-ids in staged environments (@m-ripper)

Committers: 3

3.0.11 (2020-04-06)

  • Updated Typescript to 3.8.x
  • Updated Prettier to 2.x

Committers: 2

2.x

Find the 2.x changelog here.

Join Our Newsletter

Be the first to get our free tutorials, courses, and other resources for voice app developers.