Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class QueryResult.
Represents the result of a conversational query.
Generated from protobuf message google.cloud.dialogflow.cx.v3.QueryResult
Namespace
Google \ Cloud \ Dialogflow \ Cx \ V3Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ text
↳ trigger_intent
string
If an intent
was provided as input, this field will contain a copy of the intent identifier. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>
.
↳ transcript
string
If natural language speech audio was provided as input, this field will contain the transcript for the audio.
↳ trigger_event
↳ language_code
string
The language that was triggered during intent detection. See Language Support for a list of the currently supported language codes.
↳ parameters
Google\Protobuf\Struct
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 then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
↳ response_messages
array< 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.
↳ webhook_ids
array
The list of webhook ids in the order of call sequence.
↳ webhook_display_names
array
The list of webhook display names in the order of call sequence.
↳ webhook_latencies
↳ webhook_tags
array
The list of webhook tags in the order of call sequence.
↳ webhook_statuses
↳ webhook_payloads
array< Google\Protobuf\Struct
>
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.
↳ current_page
↳ current_flow
↳ intent
Intent
The Intent
that matched the conversational query. Some, not all fields are filled in this message, including but not limited to: name
and display_name
. This field is deprecated, please use QueryResult.match
instead.
↳ intent_detection_confidence
float
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
↳ diagnostic_info
Google\Protobuf\Struct
The free-form diagnostic info. For example, this field could contain webhook call latency. The fields of this data can change without notice, so you should not write code that depends on its structure. One of the fields is called "Alternative Matched Intents", which may aid with debugging. The following describes these intent results: - The list is empty if no intent was matched to end-user input. - Only intents that are referenced in the currently active flow are included. - The matched intent is included. - Other intents that could have matched end-user input, but did not match because they are referenced by intent routes that are out of scope , are included. - Other intents referenced by intent routes in scope that matched end-user input, but had a lower confidence score.
↳ sentiment_analysis_result
SentimentAnalysisResult
The sentiment analyss result, which depends on [ analyze_query_text_sentiment
] [google.cloud.dialogflow.cx.v3.QueryParameters.analyze_query_text_sentiment], specified in the request.
↳ advanced_settings
AdvancedSettings
Returns the current advanced settings including IVR settings. Even though the operations configured by these settings are performed by Dialogflow, the client may need to perform special logic at the moment. For example, if Dialogflow exports audio to Google Cloud Storage, then the client may need to wait for the resulting object to appear in the bucket before proceeding.
↳ allow_answer_feedback
bool
Indicates whether the Thumbs up/Thumbs down rating controls are need to be shown for the response in the Dialogflow Messenger widget.
↳ data_store_connection_signals
DataStoreConnectionSignals
Optional. Data store connection feature output signals. Filled only when data stores are involved in serving the query.
getText
If natural language text was provided as input, this field will contain a copy of the text.
string
hasText
setText
If natural language text was provided as input, this field will contain a copy of the text.
var
string
$this
getTriggerIntent
If an intent
was provided as
input, this field will contain a copy of the intent identifier. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>
.
string
hasTriggerIntent
setTriggerIntent
If an intent
was provided as
input, this field will contain a copy of the intent identifier. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>
.
var
string
$this
getTranscript
If natural language speech audio was provided as input, this field will contain the transcript for the audio.
string
hasTranscript
setTranscript
If natural language speech audio was provided as input, this field will contain the transcript for the audio.
var
string
$this
getTriggerEvent
If an event was provided as input, this field will contain the name of the event.
string
hasTriggerEvent
setTriggerEvent
If an event was provided as input, this field will contain the name of the event.
var
string
$this
getDtmf
hasDtmf
setDtmf
$this
getLanguageCode
The language that was triggered during intent detection.
See Language Support for a list of the currently supported language codes.
string
setLanguageCode
The language that was triggered during intent detection.
See Language Support for a list of the currently supported language codes.
var
string
$this
getParameters
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 then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map.
- MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
hasParameters
clearParameters
setParameters
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 then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map.
- MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
$this
getResponseMessages
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.
setResponseMessages
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.
$this
getWebhookIds
The list of webhook ids in the order of call sequence.
setWebhookIds
The list of webhook ids in the order of call sequence.
var
string[]
$this
getWebhookDisplayNames
The list of webhook display names in the order of call sequence.
setWebhookDisplayNames
The list of webhook display names in the order of call sequence.
var
string[]
$this
getWebhookLatencies
The list of webhook latencies in the order of call sequence.
setWebhookLatencies
The list of webhook latencies in the order of call sequence.
$this
getWebhookTags
The list of webhook tags in the order of call sequence.
setWebhookTags
The list of webhook tags in the order of call sequence.
var
string[]
$this
getWebhookStatuses
The list of webhook call status in the order of call sequence.
setWebhookStatuses
The list of webhook call status in the order of call sequence.
$this
getWebhookPayloads
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.
setWebhookPayloads
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.
$this
getCurrentPage
The current Page
. Some, not all
fields are filled in this message, including but not limited to name
and display_name
.
hasCurrentPage
clearCurrentPage
setCurrentPage
The current Page
. Some, not all
fields are filled in this message, including but not limited to name
and display_name
.
$this
getCurrentFlow
The current Flow
. Some, not all
fields are filled in this message, including but not limited to name
and display_name
.
hasCurrentFlow
clearCurrentFlow
setCurrentFlow
The current Flow
. Some, not all
fields are filled in this message, including but not limited to name
and display_name
.
$this
getIntent
The Intent
that matched the
conversational query. Some, not all fields are filled in this message,
including but not limited to: name
and display_name
. This field is
deprecated, please use QueryResult.match
instead.
hasIntent
clearIntent
setIntent
The Intent
that matched the
conversational query. Some, not all fields are filled in this message,
including but not limited to: name
and display_name
. This field is
deprecated, please use QueryResult.match
instead.
$this
getIntentDetectionConfidence
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.
float
setIntentDetectionConfidence
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.
var
float
$this
getMatch
Intent match result, could be an intent or an event.
hasMatch
clearMatch
setMatch
Intent match result, could be an intent or an event.
$this
getDiagnosticInfo
The free-form diagnostic info. For example, this field could contain webhook call latency. The fields of this data can change without notice, so you should not write code that depends on its structure.
One of the fields is called "Alternative Matched Intents", which may aid with debugging. The following describes these intent results:
- The list is empty if no intent was matched to end-user input.
- Only intents that are referenced in the currently active flow are included.
- The matched intent is included.
- Other intents that could have matched end-user input, but did not match because they are referenced by intent routes that are out of scope , are included.
- Other intents referenced by intent routes in scope that matched end-user input, but had a lower confidence score.
hasDiagnosticInfo
clearDiagnosticInfo
setDiagnosticInfo
The free-form diagnostic info. For example, this field could contain webhook call latency. The fields of this data can change without notice, so you should not write code that depends on its structure.
One of the fields is called "Alternative Matched Intents", which may aid with debugging. The following describes these intent results:
- The list is empty if no intent was matched to end-user input.
- Only intents that are referenced in the currently active flow are included.
- The matched intent is included.
- Other intents that could have matched end-user input, but did not match because they are referenced by intent routes that are out of scope , are included.
- Other intents referenced by intent routes in scope that matched end-user input, but had a lower confidence score.
$this
getSentimentAnalysisResult
The sentiment analyss result, which depends on analyze_query_text_sentiment
,
specified in the request.
hasSentimentAnalysisResult
clearSentimentAnalysisResult
setSentimentAnalysisResult
The sentiment analyss result, which depends on analyze_query_text_sentiment
,
specified in the request.
$this
getAdvancedSettings
Returns the current advanced settings including IVR settings. Even though the operations configured by these settings are performed by Dialogflow, the client may need to perform special logic at the moment. For example, if Dialogflow exports audio to Google Cloud Storage, then the client may need to wait for the resulting object to appear in the bucket before proceeding.
hasAdvancedSettings
clearAdvancedSettings
setAdvancedSettings
Returns the current advanced settings including IVR settings. Even though the operations configured by these settings are performed by Dialogflow, the client may need to perform special logic at the moment. For example, if Dialogflow exports audio to Google Cloud Storage, then the client may need to wait for the resulting object to appear in the bucket before proceeding.
$this
getAllowAnswerFeedback
Indicates whether the Thumbs up/Thumbs down rating controls are need to be shown for the response in the Dialogflow Messenger widget.
bool
setAllowAnswerFeedback
Indicates whether the Thumbs up/Thumbs down rating controls are need to be shown for the response in the Dialogflow Messenger widget.
var
bool
$this
getDataStoreConnectionSignals
Optional. Data store connection feature output signals.
Filled only when data stores are involved in serving the query.
hasDataStoreConnectionSignals
clearDataStoreConnectionSignals
setDataStoreConnectionSignals
Optional. Data store connection feature output signals.
Filled only when data stores are involved in serving the query.
$this
getQuery
string