Conversing with the Action Package
Published in
2 min readMar 1, 2017
Conversation using the Action Package under preview as well as
all deployed action packages including Google Assistant core features should be the same experience than that of a real user of Assistant products like Google Home devices.
Source:
>>> print(assistant.converse.__doc__)Invokes a conversation using the Action Package under preview as well as all deployed action packages including Google Assistant core features. This would be the same experience user has for the real Assistant surfaces like Google Home devices.
Args:
body: object, The request body. (required)
The object takes the form of:
{ # Request for Converse.
"query": "A String", # Recognized query for user's spoken / text input.
"conversationToken": "A String", # Opaque token server passed back in previous system turn.
"debugLevel": 42, # Indicates what kind of debug info developer wants. Debug info is available
# when debug_level is > 0.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response for Converse.
"response": "A String", # Spoken response sent to user.
"debugInfo": { # Debug info Assistant shares to 3P agent to help debugging. # Debug info for this interaction. It's populated only iff debug_level > 0.
"assistantToAgentDebug": { # Container to hold debug info: Assistant --> Agent # Debug info for Assistant --> Agent.
"curlCommand": "A String", # CURL command used for developer to replay the request.
"assistantToAgentJson": "A String", # JSON request Assistant sends to Agent.
},
"agentToAssistantDebug": { # Container to hold debug info: Assistant <-- Agent # Debug info for Asistant <-- Agent.
"agentToAssistantJson": "A String", # JSON response sent from agent to assistant.
},
"sharedDebugInfo": [ # The debug info Google provides which can be shared to developer, sth like:
# [Your query is handled by Google’s system actions], or
# [Your query did not match to your Action Package]
{ # One specific entry corresponds to a specific debug info reported from 3P / 1P
# developer via Assistant SDK, or an internal debug for the server state.
"debugInfo": "A String", # Actual debug info for this entry, can be a value or a tree.
"name": "A String", # Name of this entry.
"subDebugEntry": [ # Child debug entries that semantically belong to the current debug entry,
# but have their own name, content and children.
# Object with schema name: GoogleAssistantV1DebugEntry
],
},
],
},
"expectUserResponse": True or False, # Indicates whether user's response is needed.
"conversationToken": "A String", # Opaque token passed to client which needs to be passed back once user
# responds.
"audioResponse": "A String", # The spoken_response which is synthetized speech from response.
}