QueryResult

Represents the result of a conversational query.

JSON representation
{
  "languageCode": string,
  "parameters": {
    object
  },
  "responseMessages": [
    {
      object (ResponseMessage)
    }
  ],
  "webhookStatuses": [
    {
      object (Status)
    }
  ],
  "webhookPayloads": [
    {
      object
    }
  ],
  "currentPage": {
    object (Page)
  },
  "intent": {
    object (Intent)
  },
  "intentDetectionConfidence": number,
  "match": {
    object (Match)
  },
  "diagnosticInfo": {
    object
  },

  // Union field query can be only one of the following:
  "text": string,
  "triggerIntent": string,
  "transcript": string,
  "triggerEvent": string
  // End of list of possible types for union field query.
}
Fields
languageCode

string

The language that was triggered during intent detection. See Language Support for a list of the currently supported language codes.

parameters

object (Struct format)

The collected session parameters.

Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs:

  • MapKey type: string
  • MapKey value: parameter name
  • MapValue type:
    • If parameter's entity type is a composite entity: map
    • Else: string or number, depending on parameter value type
  • MapValue value:
    • If parameter's entity type is a composite entity: map from composite entity property names to property values
    • Else: parameter value
responseMessages[]

object (ResponseMessage)

The list of rich messages returned to the client. Responses vary from simple text messages to more sophisticated, structured payloads used to drive complex logic.

webhookStatuses[]

object (Status)

The list of webhook call status in the order of call sequence.

webhookPayloads[]

object (Struct format)

The list of webhook payload in WebhookResponse.payload, in the order of call sequence. If some webhook call fails or doesn't return any payload, an empty Struct would be used instead.

currentPage

object (Page)

The current Page. Some, not all fields are filled in this message, including but not limited to name and displayName.

intent
(deprecated)

object (Intent)

The Intent that matched the conversational query. Some, not all fields are filled in this message, including but not limited to: name and displayName. This field is deprecated, please use QueryResult.match instead.

intentDetectionConfidence
(deprecated)

number

The intent detection confidence. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation. This field is deprecated, please use QueryResult.match instead.

match

object (Match)

Intent match result, could be an intent or an event.

diagnosticInfo

object (Struct format)

The free-form diagnostic info. For example, this field could contain webhook call latency. The string keys of the Struct's fields map can change without notice.

Union field query. The original conversational query. query can be only one of the following:
text

string

If natural language text was provided as input, this field will contain a copy of the text.

triggerIntent

string

If an intent was provided as input, this field will contain a copy of the intent identifier.

transcript

string

If natural language speech audio was provided as input, this field will contain the trascript for the audio.

triggerEvent

string

If an event was provided as input, this field will contain the name of the event.