- JSON representation
- QueryResult
- SentimentAnalysisResult
- Sentiment
- KnowledgeAnswers
- Answer
- MatchConfidenceLevel
The message returned from the sessions.detectIntent method.
JSON representation | |
---|---|
{ "responseId": string, "queryResult": { object ( |
Fields | |
---|---|
responseId |
The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues. |
queryResult |
The selected results of the conversational query or event processing. See |
alternativeQueryResults[] |
If Knowledge Connectors are enabled, there could be more than one result returned for a given query or event, and this field will contain all results except for the top one, which is captured in queryResult. The alternative results are ordered by decreasing |
webhookStatus |
Specifies the status of the webhook request. |
outputAudio |
The audio data bytes encoded as specified in the request. Note: The output audio is generated based on the values of default platform text responses found in the A base64-encoded string. |
outputAudioConfig |
The config used by the speech synthesizer to generate the output audio. |
QueryResult
Represents the result of conversational query or event processing.
JSON representation | |
---|---|
{ "queryText": string, "languageCode": string, "speechRecognitionConfidence": number, "action": string, "parameters": { object }, "allRequiredParamsPresent": boolean, "fulfillmentText": string, "fulfillmentMessages": [ { object ( |
Fields | |
---|---|
queryText |
The original conversational query text:
|
languageCode |
The language that was triggered during intent detection. See Language Support for a list of the currently supported language codes. |
speechRecognitionConfidence |
The Speech recognition confidence between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. The default of 0.0 is a sentinel value indicating that confidence was not set. This field is not guaranteed to be accurate or set. In particular this field isn't set for StreamingDetectIntent since the streaming endpoint has separate confidence estimates per portion of the audio in StreamingRecognitionResult. |
action |
The action name from the matched intent. |
parameters |
The collection of extracted parameters. |
allRequiredParamsPresent |
This field is set to:
|
fulfillmentText |
The text to be pronounced to the user or shown on the screen. Note: This is a legacy field, |
fulfillmentMessages[] |
The collection of rich messages to present to the user. |
webhookSource |
If the query was fulfilled by a webhook call, this field is set to the value of the |
webhookPayload |
If the query was fulfilled by a webhook call, this field is set to the value of the |
outputContexts[] |
The collection of output contexts. If applicable, |
intent |
The intent that matched the conversational query. Some, not all fields are filled in this message, including but not limited to: |
intentDetectionConfidence |
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. If there are |
diagnosticInfo |
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. |
sentimentAnalysisResult |
The sentiment analysis result, which depends on the |
knowledgeAnswers |
The result from Knowledge Connector (if any), ordered by decreasing |
SentimentAnalysisResult
The result of sentiment analysis as configured by sentimentAnalysisRequestConfig
.
JSON representation | |
---|---|
{
"queryTextSentiment": {
object ( |
Fields | |
---|---|
queryTextSentiment |
The sentiment analysis result for |
Sentiment
The sentiment, such as positive/negative feeling or association, for a unit of analysis, such as the query text.
JSON representation | |
---|---|
{ "score": number, "magnitude": number } |
Fields | |
---|---|
score |
Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
magnitude |
A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative). |
KnowledgeAnswers
Represents the result of querying a Knowledge base.
JSON representation | |
---|---|
{
"answers": [
{
object ( |
Fields | |
---|---|
answers[] |
A list of answers from Knowledge Connector. |
Answer
An answer from Knowledge Connector.
JSON representation | |
---|---|
{
"source": string,
"faqQuestion": string,
"answer": string,
"matchConfidenceLevel": enum ( |
Fields | |
---|---|
source |
Indicates which Knowledge Document this answer was extracted from. Format: |
faqQuestion |
The corresponding FAQ question if the answer was extracted from a FAQ Document, empty otherwise. |
answer |
The piece of text from the |
matchConfidenceLevel |
The system's confidence level that this knowledge answer is a good match for this conversational query. NOTE: The confidence level for a given |
matchConfidence |
The system's confidence score that this Knowledge answer is a good match for this conversational query. The range is from 0.0 (completely uncertain) to 1.0 (completely certain). Note: The confidence score is likely to vary somewhat (possibly even for identical requests), as the underlying model is under constant improvement. It may be deprecated in the future. We recommend using |
MatchConfidenceLevel
Represents the system's confidence that this knowledge answer is a good match for this conversational query.
Enums | |
---|---|
MATCH_CONFIDENCE_LEVEL_UNSPECIFIED |
Not specified. |
LOW |
Indicates that the confidence is low. |
MEDIUM |
Indicates our confidence is medium. |
HIGH |
Indicates our confidence is high. |