Dialogflow API . projects . locations . agent . sessions

Instance Methods

contexts()

Returns the contexts Resource.

entityTypes()

Returns the entityTypes Resource.

close()

Close httplib2 connections.

deleteContexts(parent, x__xgafv=None)

detectIntent(session, body=None, x__xgafv=None)

Method Details

close()
Close httplib2 connections.
deleteContexts(parent, x__xgafv=None)

Args:
  parent: string, A parameter (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
}
detectIntent(session, body=None, x__xgafv=None)

Args:
  session: string, A parameter (required)
  body: object, The request body.
    The object takes the form of:

{
  "inputAudio": "A String",
  "outputAudioConfig": {
    "audioEncoding": "A String",
    "sampleRateHertz": 42,
    "synthesizeSpeechConfig": {
      "effectsProfileId": [
        "A String",
      ],
      "pitch": 3.14,
      "pronunciations": [
        {
          "phoneticEncoding": "A String",
          "phrase": "A String",
          "pronunciation": "A String",
        },
      ],
      "speakingRate": 3.14,
      "voice": {
        "name": "A String",
        "ssmlGender": "A String",
      },
      "volumeGainDb": 3.14,
    },
  },
  "outputAudioConfigMask": "A String",
  "queryInput": {
    "audioConfig": {
      "audioEncoding": "A String",
      "disableNoSpeechRecognizedEvent": True or False,
      "enableAutomaticPunctuation": True or False,
      "enableWordInfo": True or False,
      "languageCode": "A String",
      "model": "A String",
      "modelVariant": "A String",
      "optOutConformerModelMigration": True or False,
      "phraseHints": [
        "A String",
      ],
      "phraseSets": [
        "A String",
      ],
      "sampleRateHertz": 42,
      "singleUtterance": True or False,
      "speechContexts": [
        {
          "boost": 3.14,
          "phrases": [
            "A String",
          ],
        },
      ],
    },
    "event": {
      "languageCode": "A String",
      "name": "A String",
      "parameters": {
        "a_key": "", # Properties of the object.
      },
    },
    "text": {
      "languageCode": "A String",
      "text": "A String",
    },
  },
  "queryParams": {
    "contexts": [
      {
        "lifespanCount": 42,
        "name": "A String",
        "parameters": {
          "a_key": "", # Properties of the object.
        },
      },
    ],
    "geoLocation": {
      "latitude": 3.14,
      "longitude": 3.14,
    },
    "payload": {
      "a_key": "", # Properties of the object.
    },
    "platform": "A String",
    "resetContexts": True or False,
    "sentimentAnalysisRequestConfig": {
      "analyzeQueryTextSentiment": True or False,
    },
    "sessionEntityTypes": [
      {
        "entities": [
          {
            "synonyms": [
              "A String",
            ],
            "value": "A String",
          },
        ],
        "entityOverrideMode": "A String",
        "name": "A String",
      },
    ],
    "timeZone": "A String",
    "webhookHeaders": {
      "a_key": "A String",
    },
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
  "outputAudio": "A String",
  "outputAudioConfig": {
    "audioEncoding": "A String",
    "sampleRateHertz": 42,
    "synthesizeSpeechConfig": {
      "effectsProfileId": [
        "A String",
      ],
      "pitch": 3.14,
      "pronunciations": [
        {
          "phoneticEncoding": "A String",
          "phrase": "A String",
          "pronunciation": "A String",
        },
      ],
      "speakingRate": 3.14,
      "voice": {
        "name": "A String",
        "ssmlGender": "A String",
      },
      "volumeGainDb": 3.14,
    },
  },
  "queryResult": {
    "action": "A String",
    "allRequiredParamsPresent": True or False,
    "cancelsSlotFilling": True or False,
    "diagnosticInfo": {
      "a_key": "", # Properties of the object.
    },
    "fulfillmentMessages": [
      {
        "basicCard": {
          "buttons": [
            {
              "openUriAction": {
                "uri": "A String",
              },
              "title": "A String",
            },
          ],
          "formattedText": "A String",
          "image": {
            "accessibilityText": "A String",
            "imageUri": "A String",
          },
          "subtitle": "A String",
          "title": "A String",
        },
        "browseCarouselCard": {
          "imageDisplayOptions": "A String",
          "items": [
            {
              "description": "A String",
              "footer": "A String",
              "image": {
                "accessibilityText": "A String",
                "imageUri": "A String",
              },
              "openUriAction": {
                "url": "A String",
                "urlTypeHint": "A String",
              },
              "title": "A String",
            },
          ],
        },
        "card": {
          "buttons": [
            {
              "postback": "A String",
              "text": "A String",
            },
          ],
          "imageUri": "A String",
          "subtitle": "A String",
          "title": "A String",
        },
        "carouselSelect": {
          "items": [
            {
              "description": "A String",
              "image": {
                "accessibilityText": "A String",
                "imageUri": "A String",
              },
              "info": {
                "key": "A String",
                "synonyms": [
                  "A String",
                ],
              },
              "title": "A String",
            },
          ],
        },
        "image": {
          "accessibilityText": "A String",
          "imageUri": "A String",
        },
        "linkOutSuggestion": {
          "destinationName": "A String",
          "uri": "A String",
        },
        "listSelect": {
          "items": [
            {
              "description": "A String",
              "image": {
                "accessibilityText": "A String",
                "imageUri": "A String",
              },
              "info": {
                "key": "A String",
                "synonyms": [
                  "A String",
                ],
              },
              "title": "A String",
            },
          ],
          "subtitle": "A String",
          "title": "A String",
        },
        "mediaContent": {
          "mediaObjects": [
            {
              "contentUrl": "A String",
              "description": "A String",
              "icon": {
                "accessibilityText": "A String",
                "imageUri": "A String",
              },
              "largeImage": {
                "accessibilityText": "A String",
                "imageUri": "A String",
              },
              "name": "A String",
            },
          ],
          "mediaType": "A String",
        },
        "payload": {
          "a_key": "", # Properties of the object.
        },
        "platform": "A String",
        "quickReplies": {
          "quickReplies": [
            "A String",
          ],
          "title": "A String",
        },
        "simpleResponses": {
          "simpleResponses": [
            {
              "displayText": "A String",
              "ssml": "A String",
              "textToSpeech": "A String",
            },
          ],
        },
        "suggestions": {
          "suggestions": [
            {
              "title": "A String",
            },
          ],
        },
        "tableCard": {
          "buttons": [
            {
              "openUriAction": {
                "uri": "A String",
              },
              "title": "A String",
            },
          ],
          "columnProperties": [
            {
              "header": "A String",
              "horizontalAlignment": "A String",
            },
          ],
          "image": {
            "accessibilityText": "A String",
            "imageUri": "A String",
          },
          "rows": [
            {
              "cells": [
                {
                  "text": "A String",
                },
              ],
              "dividerAfter": True or False,
            },
          ],
          "subtitle": "A String",
          "title": "A String",
        },
        "text": {
          "text": [
            "A String",
          ],
        },
      },
    ],
    "fulfillmentText": "A String",
    "intent": {
      "action": "A String",
      "defaultResponsePlatforms": [
        "A String",
      ],
      "displayName": "A String",
      "endInteraction": True or False,
      "events": [
        "A String",
      ],
      "followupIntentInfo": [
        {
          "followupIntentName": "A String",
          "parentFollowupIntentName": "A String",
        },
      ],
      "inputContextNames": [
        "A String",
      ],
      "isFallback": True or False,
      "liveAgentHandoff": True or False,
      "messages": [
        {
          "basicCard": {
            "buttons": [
              {
                "openUriAction": {
                  "uri": "A String",
                },
                "title": "A String",
              },
            ],
            "formattedText": "A String",
            "image": {
              "accessibilityText": "A String",
              "imageUri": "A String",
            },
            "subtitle": "A String",
            "title": "A String",
          },
          "browseCarouselCard": {
            "imageDisplayOptions": "A String",
            "items": [
              {
                "description": "A String",
                "footer": "A String",
                "image": {
                  "accessibilityText": "A String",
                  "imageUri": "A String",
                },
                "openUriAction": {
                  "url": "A String",
                  "urlTypeHint": "A String",
                },
                "title": "A String",
              },
            ],
          },
          "card": {
            "buttons": [
              {
                "postback": "A String",
                "text": "A String",
              },
            ],
            "imageUri": "A String",
            "subtitle": "A String",
            "title": "A String",
          },
          "carouselSelect": {
            "items": [
              {
                "description": "A String",
                "image": {
                  "accessibilityText": "A String",
                  "imageUri": "A String",
                },
                "info": {
                  "key": "A String",
                  "synonyms": [
                    "A String",
                  ],
                },
                "title": "A String",
              },
            ],
          },
          "image": {
            "accessibilityText": "A String",
            "imageUri": "A String",
          },
          "linkOutSuggestion": {
            "destinationName": "A String",
            "uri": "A String",
          },
          "listSelect": {
            "items": [
              {
                "description": "A String",
                "image": {
                  "accessibilityText": "A String",
                  "imageUri": "A String",
                },
                "info": {
                  "key": "A String",
                  "synonyms": [
                    "A String",
                  ],
                },
                "title": "A String",
              },
            ],
            "subtitle": "A String",
            "title": "A String",
          },
          "mediaContent": {
            "mediaObjects": [
              {
                "contentUrl": "A String",
                "description": "A String",
                "icon": {
                  "accessibilityText": "A String",
                  "imageUri": "A String",
                },
                "largeImage": {
                  "accessibilityText": "A String",
                  "imageUri": "A String",
                },
                "name": "A String",
              },
            ],
            "mediaType": "A String",
          },
          "payload": {
            "a_key": "", # Properties of the object.
          },
          "platform": "A String",
          "quickReplies": {
            "quickReplies": [
              "A String",
            ],
            "title": "A String",
          },
          "simpleResponses": {
            "simpleResponses": [
              {
                "displayText": "A String",
                "ssml": "A String",
                "textToSpeech": "A String",
              },
            ],
          },
          "suggestions": {
            "suggestions": [
              {
                "title": "A String",
              },
            ],
          },
          "tableCard": {
            "buttons": [
              {
                "openUriAction": {
                  "uri": "A String",
                },
                "title": "A String",
              },
            ],
            "columnProperties": [
              {
                "header": "A String",
                "horizontalAlignment": "A String",
              },
            ],
            "image": {
              "accessibilityText": "A String",
              "imageUri": "A String",
            },
            "rows": [
              {
                "cells": [
                  {
                    "text": "A String",
                  },
                ],
                "dividerAfter": True or False,
              },
            ],
            "subtitle": "A String",
            "title": "A String",
          },
          "text": {
            "text": [
              "A String",
            ],
          },
        },
      ],
      "mlDisabled": True or False,
      "name": "A String",
      "outputContexts": [
        {
          "lifespanCount": 42,
          "name": "A String",
          "parameters": {
            "a_key": "", # Properties of the object.
          },
        },
      ],
      "parameters": [
        {
          "defaultValue": "A String",
          "displayName": "A String",
          "entityTypeDisplayName": "A String",
          "isList": True or False,
          "mandatory": True or False,
          "name": "A String",
          "prompts": [
            "A String",
          ],
          "value": "A String",
        },
      ],
      "parentFollowupIntentName": "A String",
      "priority": 42,
      "resetContexts": True or False,
      "rootFollowupIntentName": "A String",
      "trainingPhrases": [
        {
          "name": "A String",
          "parts": [
            {
              "alias": "A String",
              "entityType": "A String",
              "text": "A String",
              "userDefined": True or False,
            },
          ],
          "timesAddedCount": 42,
          "type": "A String",
        },
      ],
      "webhookState": "A String",
    },
    "intentDetectionConfidence": 3.14,
    "languageCode": "A String",
    "outputContexts": [
      {
        "lifespanCount": 42,
        "name": "A String",
        "parameters": {
          "a_key": "", # Properties of the object.
        },
      },
    ],
    "parameters": {
      "a_key": "", # Properties of the object.
    },
    "queryText": "A String",
    "sentimentAnalysisResult": {
      "queryTextSentiment": {
        "magnitude": 3.14,
        "score": 3.14,
      },
    },
    "speechRecognitionConfidence": 3.14,
    "webhookPayload": {
      "a_key": "", # Properties of the object.
    },
    "webhookSource": "A String",
  },
  "responseId": "A String",
  "webhookStatus": {
    "code": 42,
    "details": [
      {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    ],
    "message": "A String",
  },
}