Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="dialogflow_v2.html">Dialogflow API</a> . <a href="dialogflow_v2.projects.html">projects</a> . <a href="dialogflow_v2.projects.agent.html">agent</a> . <a href="dialogflow_v2.projects.agent.sessions.html">sessions</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="dialogflow_v2.projects.agent.sessions.contexts.html">contexts()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the contexts Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
| 83 | <code><a href="dialogflow_v2.projects.agent.sessions.entityTypes.html">entityTypes()</a></code> |
| 84 | </p> |
| 85 | <p class="firstline">Returns the entityTypes Resource.</p> |
| 86 | |
| 87 | <p class="toc_element"> |
| 88 | <code><a href="#deleteContexts">deleteContexts(parent, x__xgafv=None)</a></code></p> |
| 89 | <p class="firstline">Deletes all active contexts in the specified session.</p> |
| 90 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 91 | <code><a href="#detectIntent">detectIntent(session, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 92 | <p class="firstline">Processes a natural language query and returns structured, actionable data</p> |
| 93 | <h3>Method Details</h3> |
| 94 | <div class="method"> |
| 95 | <code class="details" id="deleteContexts">deleteContexts(parent, x__xgafv=None)</code> |
| 96 | <pre>Deletes all active contexts in the specified session. |
| 97 | |
| 98 | Args: |
| 99 | parent: string, Required. The name of the session to delete all contexts from. Format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 100 | `projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project |
| 101 | ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session |
| 102 | ID>`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 103 | If `Environment ID` is not specified we assume default 'draft' environment. |
| 104 | If `User ID` is not specified, we assume default '-' user. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 105 | x__xgafv: string, V1 error format. |
| 106 | Allowed values |
| 107 | 1 - v1 error format |
| 108 | 2 - v2 error format |
| 109 | |
| 110 | Returns: |
| 111 | An object of the form: |
| 112 | |
| 113 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 114 | # empty messages in your APIs. A typical example is to use it as the request |
| 115 | # or the response type of an API method. For instance: |
| 116 | # |
| 117 | # service Foo { |
| 118 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 119 | # } |
| 120 | # |
| 121 | # The JSON representation for `Empty` is empty JSON object `{}`. |
| 122 | }</pre> |
| 123 | </div> |
| 124 | |
| 125 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 126 | <code class="details" id="detectIntent">detectIntent(session, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 127 | <pre>Processes a natural language query and returns structured, actionable data |
| 128 | as a result. This method is not idempotent, because it may cause contexts |
| 129 | and session entity types to be updated, which in turn might affect |
| 130 | results of future queries. |
| 131 | |
| 132 | Args: |
| 133 | session: string, Required. The name of the session this query is sent to. Format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 134 | `projects/<Project ID>/agent/sessions/<Session ID>`, or |
| 135 | `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 136 | ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 137 | default 'draft' environment. If `User ID` is not specified, we are using |
| 138 | "-". It's up to the API caller to choose an appropriate `Session ID` and |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 139 | `User Id`. They can be a random number or some type of user and session |
| 140 | identifiers (preferably hashed). The length of the `Session ID` and |
| 141 | `User ID` must not exceed 36 characters. (required) |
| 142 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 143 | The object takes the form of: |
| 144 | |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 145 | { # The request to detect user's intent. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 146 | "outputAudioConfig": { # Instructs the speech synthesizer on how to generate the output audio content. # Instructs the speech synthesizer how to generate the output |
| 147 | # audio. If this field is not set and agent-level speech synthesizer is not |
| 148 | # configured, no output audio is generated. |
| 149 | # If this audio config is supplied in a request, it overrides all existing |
| 150 | # text-to-speech settings applied to the agent. |
| 151 | "audioEncoding": "A String", # Required. Audio encoding of the synthesized audio content. |
| 152 | "synthesizeSpeechConfig": { # Configuration of how speech should be synthesized. # Configuration of how speech should be synthesized. |
| 153 | "volumeGainDb": 3.14, # Optional. Volume gain (in dB) of the normal native volume supported by the |
| 154 | # specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of |
| 155 | # 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) |
| 156 | # will play at approximately half the amplitude of the normal native signal |
| 157 | # amplitude. A value of +6.0 (dB) will play at approximately twice the |
| 158 | # amplitude of the normal native signal amplitude. We strongly recommend not |
| 159 | # to exceed +10 (dB) as there's usually no effective increase in loudness for |
| 160 | # any value greater than that. |
| 161 | "pitch": 3.14, # Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 |
| 162 | # semitones from the original pitch. -20 means decrease 20 semitones from the |
| 163 | # original pitch. |
| 164 | "voice": { # Description of which voice to use for speech synthesis. # Optional. The desired voice of the synthesized audio. |
| 165 | "name": "A String", # Optional. The name of the voice. If not set, the service will choose a |
| 166 | # voice based on the other parameters such as language_code and |
| 167 | # ssml_gender. |
| 168 | "ssmlGender": "A String", # Optional. The preferred gender of the voice. If not set, the service will |
| 169 | # choose a voice based on the other parameters such as language_code and |
| 170 | # name. Note that this is only a preference, not requirement. If a |
| 171 | # voice of the appropriate gender is not available, the synthesizer should |
| 172 | # substitute a voice with a different gender rather than failing the request. |
| 173 | }, |
| 174 | "speakingRate": 3.14, # Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal |
| 175 | # native speed supported by the specific voice. 2.0 is twice as fast, and |
| 176 | # 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any |
| 177 | # other values < 0.25 or > 4.0 will return an error. |
| 178 | "effectsProfileId": [ # Optional. An identifier which selects 'audio effects' profiles that are |
| 179 | # applied on (post synthesized) text to speech. Effects are applied on top of |
| 180 | # each other in the order they are given. |
| 181 | "A String", |
| 182 | ], |
| 183 | }, |
| 184 | "sampleRateHertz": 42, # The synthesis sample rate (in hertz) for this audio. If not |
| 185 | # provided, then the synthesizer will use the default sample rate based on |
| 186 | # the audio encoding. If this is different from the voice's natural sample |
| 187 | # rate, then the synthesizer will honor this request by converting to the |
| 188 | # desired sample rate (which might result in worse audio quality). |
| 189 | }, |
| 190 | "inputAudio": "A String", # The natural language speech audio to be processed. This field |
| 191 | # should be populated iff `query_input` is set to an input audio config. |
| 192 | # A single request can contain up to 1 minute of speech audio data. |
| 193 | "outputAudioConfigMask": "A String", # Mask for output_audio_config indicating which settings in this |
| 194 | # request-level config should override speech synthesizer settings defined at |
| 195 | # agent-level. |
| 196 | # |
| 197 | # If unspecified or empty, output_audio_config replaces the agent-level |
| 198 | # config in its entirety. |
| 199 | "queryInput": { # Represents the query input. It can contain either: # Required. The input specification. It can be set to: |
| 200 | # |
| 201 | # 1. an audio config |
| 202 | # which instructs the speech recognizer how to process the speech audio, |
| 203 | # |
| 204 | # 2. a conversational query in the form of text, or |
| 205 | # |
| 206 | # 3. an event that specifies which intent to trigger. |
| 207 | # |
| 208 | # 1. An audio config which |
| 209 | # instructs the speech recognizer how to process the speech audio. |
| 210 | # |
| 211 | # 2. A conversational query in the form of text,. |
| 212 | # |
| 213 | # 3. An event that specifies which intent to trigger. |
| 214 | "event": { # Events allow for matching intents by event name instead of the natural # The event to be processed. |
| 215 | # language input. For instance, input `<event: { name: "welcome_event", |
| 216 | # parameters: { name: "Sam" } }>` can trigger a personalized welcome response. |
| 217 | # The parameter `name` may be used by the agent in the response: |
| 218 | # `"Hello #welcome_event.name! What can I do for you today?"`. |
| 219 | "languageCode": "A String", # Required. The language of this query. See [Language |
| 220 | # Support](https://cloud.google.com/dialogflow/docs/reference/language) |
| 221 | # for a list of the currently supported language codes. Note that queries in |
| 222 | # the same session do not necessarily need to specify the same language. |
| 223 | "name": "A String", # Required. The unique identifier of the event. |
| 224 | "parameters": { # The collection of parameters associated with the event. |
| 225 | # |
| 226 | # Depending on your protocol or client library language, this is a |
| 227 | # map, associative array, symbol table, dictionary, or JSON object |
| 228 | # composed of a collection of (MapKey, MapValue) pairs: |
| 229 | # |
| 230 | # - MapKey type: string |
| 231 | # - MapKey value: parameter name |
| 232 | # - MapValue type: |
| 233 | # - If parameter's entity type is a composite entity: map |
| 234 | # - Else: string or number, depending on parameter value type |
| 235 | # - MapValue value: |
| 236 | # - If parameter's entity type is a composite entity: |
| 237 | # map from composite entity property names to property values |
| 238 | # - Else: parameter value |
| 239 | "a_key": "", # Properties of the object. |
| 240 | }, |
| 241 | }, |
| 242 | "text": { # Represents the natural language text to be processed. # The natural language text to be processed. |
| 243 | "languageCode": "A String", # Required. The language of this conversational query. See [Language |
| 244 | # Support](https://cloud.google.com/dialogflow/docs/reference/language) |
| 245 | # for a list of the currently supported language codes. Note that queries in |
| 246 | # the same session do not necessarily need to specify the same language. |
| 247 | "text": "A String", # Required. The UTF-8 encoded natural language text to be processed. |
| 248 | # Text length must not exceed 256 characters. |
| 249 | }, |
| 250 | "audioConfig": { # Instructs the speech recognizer how to process the audio content. # Instructs the speech recognizer how to process the speech audio. |
| 251 | "audioEncoding": "A String", # Required. Audio encoding of the audio content to process. |
| 252 | "singleUtterance": True or False, # If `false` (default), recognition does not cease until the |
| 253 | # client closes the stream. |
| 254 | # If `true`, the recognizer will detect a single spoken utterance in input |
| 255 | # audio. Recognition ceases when it detects the audio's voice has |
| 256 | # stopped or paused. In this case, once a detected intent is received, the |
| 257 | # client should close the stream and start a new request with a new stream as |
| 258 | # needed. |
| 259 | # Note: This setting is relevant only for streaming methods. |
| 260 | # Note: When specified, InputAudioConfig.single_utterance takes precedence |
| 261 | # over StreamingDetectIntentRequest.single_utterance. |
| 262 | "languageCode": "A String", # Required. The language of the supplied audio. Dialogflow does not do |
| 263 | # translations. See [Language |
| 264 | # Support](https://cloud.google.com/dialogflow/docs/reference/language) |
| 265 | # for a list of the currently supported language codes. Note that queries in |
| 266 | # the same session do not necessarily need to specify the same language. |
| 267 | "speechContexts": [ # Context information to assist speech recognition. |
| 268 | # |
| 269 | # See [the Cloud Speech |
| 270 | # documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) |
| 271 | # for more details. |
| 272 | { # Hints for the speech recognizer to help with recognition in a specific |
| 273 | # conversation state. |
| 274 | "phrases": [ # Optional. A list of strings containing words and phrases that the speech |
| 275 | # recognizer should recognize with higher likelihood. |
| 276 | # |
| 277 | # This list can be used to: |
| 278 | # * improve accuracy for words and phrases you expect the user to say, |
| 279 | # e.g. typical commands for your Dialogflow agent |
| 280 | # * add additional words to the speech recognizer vocabulary |
| 281 | # * ... |
| 282 | # |
| 283 | # See the [Cloud Speech |
| 284 | # documentation](https://cloud.google.com/speech-to-text/quotas) for usage |
| 285 | # limits. |
| 286 | "A String", |
| 287 | ], |
| 288 | "boost": 3.14, # Optional. Boost for this context compared to other contexts: |
| 289 | # |
| 290 | # * If the boost is positive, Dialogflow will increase the probability that |
| 291 | # the phrases in this context are recognized over similar sounding phrases. |
| 292 | # * If the boost is unspecified or non-positive, Dialogflow will not apply |
| 293 | # any boost. |
| 294 | # |
| 295 | # Dialogflow recommends that you use boosts in the range (0, 20] and that you |
| 296 | # find a value that fits your use case with binary search. |
| 297 | }, |
| 298 | ], |
| 299 | "phraseHints": [ # A list of strings containing words and phrases that the speech |
| 300 | # recognizer should recognize with higher likelihood. |
| 301 | # |
| 302 | # See [the Cloud Speech |
| 303 | # documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) |
| 304 | # for more details. |
| 305 | # |
| 306 | # This field is deprecated. Please use [speech_contexts]() instead. If you |
| 307 | # specify both [phrase_hints]() and [speech_contexts](), Dialogflow will |
| 308 | # treat the [phrase_hints]() as a single additional [SpeechContext](). |
| 309 | "A String", |
| 310 | ], |
| 311 | "enableWordInfo": True or False, # If `true`, Dialogflow returns SpeechWordInfo in |
| 312 | # StreamingRecognitionResult with information about the recognized speech |
| 313 | # words, e.g. start and end time offsets. If false or unspecified, Speech |
| 314 | # doesn't return any word-level information. |
| 315 | "sampleRateHertz": 42, # Required. Sample rate (in Hertz) of the audio content sent in the query. |
| 316 | # Refer to |
| 317 | # [Cloud Speech API |
| 318 | # documentation](https://cloud.google.com/speech-to-text/docs/basics) for |
| 319 | # more details. |
| 320 | "model": "A String", # Which Speech model to select for the given request. Select the |
| 321 | # model best suited to your domain to get best results. If a model is not |
| 322 | # explicitly specified, then we auto-select a model based on the parameters |
| 323 | # in the InputAudioConfig. |
| 324 | # If enhanced speech model is enabled for the agent and an enhanced |
| 325 | # version of the specified model for the language does not exist, then the |
| 326 | # speech is recognized using the standard version of the specified model. |
| 327 | # Refer to |
| 328 | # [Cloud Speech API |
| 329 | # documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) |
| 330 | # for more details. |
| 331 | "modelVariant": "A String", # Which variant of the Speech model to use. |
| 332 | }, |
| 333 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 334 | "queryParams": { # Represents the parameters of the conversational query. # The parameters of this query. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 335 | "contexts": [ # The collection of contexts to be activated before this query is |
| 336 | # executed. |
| 337 | { # Represents a context. |
| 338 | "lifespanCount": 42, # Optional. The number of conversational query requests after which the |
| 339 | # context expires. The default is `0`. If set to `0`, the context expires |
| 340 | # immediately. Contexts expire automatically after 20 minutes if there |
| 341 | # are no matching queries. |
| 342 | "name": "A String", # Required. The unique identifier of the context. Format: |
| 343 | # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, |
| 344 | # or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 345 | # ID>/sessions/<Session ID>/contexts/<Context ID>`. |
| 346 | # |
| 347 | # The `Context ID` is always converted to lowercase, may only contain |
| 348 | # characters in a-zA-Z0-9_-% and may be at most 250 bytes long. |
| 349 | # |
| 350 | # If `Environment ID` is not specified, we assume default 'draft' |
| 351 | # environment. If `User ID` is not specified, we assume default '-' user. |
| 352 | # |
| 353 | # The following context names are reserved for internal use by Dialogflow. |
| 354 | # You should not use these contexts or create contexts with these names: |
| 355 | # |
| 356 | # * `__system_counters__` |
| 357 | # * `*_id_dialog_context` |
| 358 | # * `*_dialog_params_size` |
| 359 | "parameters": { # Optional. The collection of parameters associated with this context. |
| 360 | # |
| 361 | # Depending on your protocol or client library language, this is a |
| 362 | # map, associative array, symbol table, dictionary, or JSON object |
| 363 | # composed of a collection of (MapKey, MapValue) pairs: |
| 364 | # |
| 365 | # - MapKey type: string |
| 366 | # - MapKey value: parameter name |
| 367 | # - MapValue type: |
| 368 | # - If parameter's entity type is a composite entity: map |
| 369 | # - Else: string or number, depending on parameter value type |
| 370 | # - MapValue value: |
| 371 | # - If parameter's entity type is a composite entity: |
| 372 | # map from composite entity property names to property values |
| 373 | # - Else: parameter value |
| 374 | "a_key": "", # Properties of the object. |
| 375 | }, |
| 376 | }, |
| 377 | ], |
| 378 | "sentimentAnalysisRequestConfig": { # Configures the types of sentiment analysis to perform. # Configures the type of sentiment analysis to perform. If not |
| 379 | # provided, sentiment analysis is not performed. |
| 380 | "analyzeQueryTextSentiment": True or False, # Instructs the service to perform sentiment analysis on |
| 381 | # `query_text`. If not provided, sentiment analysis is not performed on |
| 382 | # `query_text`. |
| 383 | }, |
| 384 | "timeZone": "A String", # The time zone of this conversational query from the |
| 385 | # [time zone database](https://www.iana.org/time-zones), e.g., |
| 386 | # America/New_York, Europe/Paris. If not provided, the time zone specified in |
| 387 | # agent settings is used. |
| 388 | "sessionEntityTypes": [ # Additional session entity types to replace or extend developer |
| 389 | # entity types with. The entity synonyms apply to all languages and persist |
| 390 | # for the session of this query. |
| 391 | { # Represents a session entity type. |
| 392 | # |
| 393 | # Extends or replaces a custom entity type at the user session level (we |
| 394 | # refer to the entity types defined at the agent level as "custom entity |
| 395 | # types"). |
| 396 | # |
| 397 | # Note: session entity types apply to all queries, regardless of the language. |
| 398 | "name": "A String", # Required. The unique identifier of this session entity type. Format: |
| 399 | # `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type |
| 400 | # Display Name>`, or `projects/<Project ID>/agent/environments/<Environment |
| 401 | # ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display |
| 402 | # Name>`. |
| 403 | # If `Environment ID` is not specified, we assume default 'draft' |
| 404 | # environment. If `User ID` is not specified, we assume default '-' user. |
| 405 | # |
| 406 | # `<Entity Type Display Name>` must be the display name of an existing entity |
| 407 | # type in the same agent that will be overridden or supplemented. |
| 408 | "entityOverrideMode": "A String", # Required. Indicates whether the additional data should override or |
| 409 | # supplement the custom entity type definition. |
| 410 | "entities": [ # Required. The collection of entities associated with this session entity |
| 411 | # type. |
| 412 | { # An **entity entry** for an associated entity type. |
| 413 | "value": "A String", # Required. The primary value associated with this entity entry. |
| 414 | # For example, if the entity type is *vegetable*, the value could be |
| 415 | # *scallions*. |
| 416 | # |
| 417 | # For `KIND_MAP` entity types: |
| 418 | # |
| 419 | # * A reference value to be used in place of synonyms. |
| 420 | # |
| 421 | # For `KIND_LIST` entity types: |
| 422 | # |
| 423 | # * A string that can contain references to other entity types (with or |
| 424 | # without aliases). |
| 425 | "synonyms": [ # Required. A collection of value synonyms. For example, if the entity type |
| 426 | # is *vegetable*, and `value` is *scallions*, a synonym could be *green |
| 427 | # onions*. |
| 428 | # |
| 429 | # For `KIND_LIST` entity types: |
| 430 | # |
| 431 | # * This collection must contain exactly one synonym equal to `value`. |
| 432 | "A String", |
| 433 | ], |
| 434 | }, |
| 435 | ], |
| 436 | }, |
| 437 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 438 | "resetContexts": True or False, # Specifies whether to delete all contexts in the current session |
| 439 | # before the new ones are activated. |
| 440 | "geoLocation": { # An object representing a latitude/longitude pair. This is expressed as a pair # The geo location of this conversational query. |
| 441 | # of doubles representing degrees latitude and degrees longitude. Unless |
| 442 | # specified otherwise, this must conform to the |
| 443 | # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 |
| 444 | # standard</a>. Values must be within normalized ranges. |
| 445 | "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. |
| 446 | "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 447 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 448 | "payload": { # This field can be used to pass custom data to your webhook. |
| 449 | # Arbitrary JSON objects are supported. |
| 450 | # If supplied, the value is used to populate the |
| 451 | # `WebhookRequest.original_detect_intent_request.payload` |
| 452 | # field sent to your webhook. |
| 453 | "a_key": "", # Properties of the object. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 454 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 455 | }, |
| 456 | } |
| 457 | |
| 458 | x__xgafv: string, V1 error format. |
| 459 | Allowed values |
| 460 | 1 - v1 error format |
| 461 | 2 - v2 error format |
| 462 | |
| 463 | Returns: |
| 464 | An object of the form: |
| 465 | |
| 466 | { # The message returned from the DetectIntent method. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 467 | "outputAudioConfig": { # Instructs the speech synthesizer on how to generate the output audio content. # The config used by the speech synthesizer to generate the output audio. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 468 | # If this audio config is supplied in a request, it overrides all existing |
| 469 | # text-to-speech settings applied to the agent. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 470 | "audioEncoding": "A String", # Required. Audio encoding of the synthesized audio content. |
| 471 | "synthesizeSpeechConfig": { # Configuration of how speech should be synthesized. # Configuration of how speech should be synthesized. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 472 | "volumeGainDb": 3.14, # Optional. Volume gain (in dB) of the normal native volume supported by the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 473 | # specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of |
| 474 | # 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) |
| 475 | # will play at approximately half the amplitude of the normal native signal |
| 476 | # amplitude. A value of +6.0 (dB) will play at approximately twice the |
| 477 | # amplitude of the normal native signal amplitude. We strongly recommend not |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 478 | # to exceed +10 (dB) as there's usually no effective increase in loudness for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 479 | # any value greater than that. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 480 | "pitch": 3.14, # Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 481 | # semitones from the original pitch. -20 means decrease 20 semitones from the |
| 482 | # original pitch. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 483 | "voice": { # Description of which voice to use for speech synthesis. # Optional. The desired voice of the synthesized audio. |
| 484 | "name": "A String", # Optional. The name of the voice. If not set, the service will choose a |
| 485 | # voice based on the other parameters such as language_code and |
| 486 | # ssml_gender. |
| 487 | "ssmlGender": "A String", # Optional. The preferred gender of the voice. If not set, the service will |
| 488 | # choose a voice based on the other parameters such as language_code and |
| 489 | # name. Note that this is only a preference, not requirement. If a |
| 490 | # voice of the appropriate gender is not available, the synthesizer should |
| 491 | # substitute a voice with a different gender rather than failing the request. |
| 492 | }, |
| 493 | "speakingRate": 3.14, # Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal |
| 494 | # native speed supported by the specific voice. 2.0 is twice as fast, and |
| 495 | # 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any |
| 496 | # other values < 0.25 or > 4.0 will return an error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 497 | "effectsProfileId": [ # Optional. An identifier which selects 'audio effects' profiles that are |
| 498 | # applied on (post synthesized) text to speech. Effects are applied on top of |
| 499 | # each other in the order they are given. |
| 500 | "A String", |
| 501 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 502 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 503 | "sampleRateHertz": 42, # The synthesis sample rate (in hertz) for this audio. If not |
| 504 | # provided, then the synthesizer will use the default sample rate based on |
| 505 | # the audio encoding. If this is different from the voice's natural sample |
| 506 | # rate, then the synthesizer will honor this request by converting to the |
| 507 | # desired sample rate (which might result in worse audio quality). |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 508 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 509 | "queryResult": { # Represents the result of conversational query or event processing. # The selected results of the conversational query or event processing. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 510 | # See `alternative_query_results` for additional potential results. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 511 | "fulfillmentMessages": [ # The collection of rich messages to present to the user. |
| 512 | { # A rich response message. |
| 513 | # Corresponds to the intent `Response` field in the Dialogflow console. |
| 514 | # For more information, see |
| 515 | # [Rich response |
| 516 | # messages](https://cloud.google.com/dialogflow/docs/intents-rich-messages). |
| 517 | "mediaContent": { # The media content card for Actions on Google. # The media content card for Actions on Google. |
| 518 | "mediaType": "A String", # Optional. What type of media is the content (ie "audio"). |
| 519 | "mediaObjects": [ # Required. List of media objects. |
| 520 | { # Response media object for media content card. |
| 521 | "name": "A String", # Required. Name of media card. |
| 522 | "description": "A String", # Optional. Description of media card. |
| 523 | "contentUrl": "A String", # Required. Url where the media is stored. |
| 524 | "icon": { # The image response message. # Optional. Icon to display above media content. |
| 525 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 526 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 527 | # e.g., screen readers. |
| 528 | }, |
| 529 | "largeImage": { # The image response message. # Optional. Image to display above media content. |
| 530 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 531 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 532 | # e.g., screen readers. |
| 533 | }, |
| 534 | }, |
| 535 | ], |
| 536 | }, |
| 537 | "image": { # The image response message. # The image response. |
| 538 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 539 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 540 | # e.g., screen readers. |
| 541 | }, |
| 542 | "payload": { # A custom platform-specific response. |
| 543 | "a_key": "", # Properties of the object. |
| 544 | }, |
| 545 | "text": { # The text response message. # The text response. |
| 546 | "text": [ # Optional. The collection of the agent's responses. |
| 547 | "A String", |
| 548 | ], |
| 549 | }, |
| 550 | "platform": "A String", # Optional. The platform that this message is intended for. |
| 551 | "suggestions": { # The collection of suggestions. # The suggestion chips for Actions on Google. |
| 552 | "suggestions": [ # Required. The list of suggested replies. |
| 553 | { # The suggestion chip message that the user can tap to quickly post a reply |
| 554 | # to the conversation. |
| 555 | "title": "A String", # Required. The text shown the in the suggestion chip. |
| 556 | }, |
| 557 | ], |
| 558 | }, |
| 559 | "listSelect": { # The card for presenting a list of options to select from. # The list card response for Actions on Google. |
| 560 | "subtitle": "A String", # Optional. Subtitle of the list. |
| 561 | "items": [ # Required. List items. |
| 562 | { # An item in the list. |
| 563 | "title": "A String", # Required. The title of the list item. |
| 564 | "image": { # The image response message. # Optional. The image to display. |
| 565 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 566 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 567 | # e.g., screen readers. |
| 568 | }, |
| 569 | "description": "A String", # Optional. The main text describing the item. |
| 570 | "info": { # Additional info about the select item for when it is triggered in a # Required. Additional information about this option. |
| 571 | # dialog. |
| 572 | "synonyms": [ # Optional. A list of synonyms that can also be used to trigger this |
| 573 | # item in dialog. |
| 574 | "A String", |
| 575 | ], |
| 576 | "key": "A String", # Required. A unique key that will be sent back to the agent if this |
| 577 | # response is given. |
| 578 | }, |
| 579 | }, |
| 580 | ], |
| 581 | "title": "A String", # Optional. The overall title of the list. |
| 582 | }, |
| 583 | "quickReplies": { # The quick replies response message. # The quick replies response. |
| 584 | "title": "A String", # Optional. The title of the collection of quick replies. |
| 585 | "quickReplies": [ # Optional. The collection of quick replies. |
| 586 | "A String", |
| 587 | ], |
| 588 | }, |
| 589 | "card": { # The card response message. # The card response. |
| 590 | "imageUri": "A String", # Optional. The public URI to an image file for the card. |
| 591 | "title": "A String", # Optional. The title of the card. |
| 592 | "buttons": [ # Optional. The collection of card buttons. |
| 593 | { # Contains information about a button. |
| 594 | "text": "A String", # Optional. The text to show on the button. |
| 595 | "postback": "A String", # Optional. The text to send back to the Dialogflow API or a URI to |
| 596 | # open. |
| 597 | }, |
| 598 | ], |
| 599 | "subtitle": "A String", # Optional. The subtitle of the card. |
| 600 | }, |
| 601 | "basicCard": { # The basic card message. Useful for displaying information. # The basic card response for Actions on Google. |
| 602 | "title": "A String", # Optional. The title of the card. |
| 603 | "image": { # The image response message. # Optional. The image for the card. |
| 604 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 605 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 606 | # e.g., screen readers. |
| 607 | }, |
| 608 | "formattedText": "A String", # Required, unless image is present. The body text of the card. |
| 609 | "buttons": [ # Optional. The collection of card buttons. |
| 610 | { # The button object that appears at the bottom of a card. |
| 611 | "title": "A String", # Required. The title of the button. |
| 612 | "openUriAction": { # Opens the given URI. # Required. Action to take when a user taps on the button. |
| 613 | "uri": "A String", # Required. The HTTP or HTTPS scheme URI. |
| 614 | }, |
| 615 | }, |
| 616 | ], |
| 617 | "subtitle": "A String", # Optional. The subtitle of the card. |
| 618 | }, |
| 619 | "tableCard": { # Table card for Actions on Google. # Table card for Actions on Google. |
| 620 | "title": "A String", # Required. Title of the card. |
| 621 | "rows": [ # Optional. Rows in this table of data. |
| 622 | { # Row of TableCard. |
| 623 | "dividerAfter": True or False, # Optional. Whether to add a visual divider after this row. |
| 624 | "cells": [ # Optional. List of cells that make up this row. |
| 625 | { # Cell of TableCardRow. |
| 626 | "text": "A String", # Required. Text in this cell. |
| 627 | }, |
| 628 | ], |
| 629 | }, |
| 630 | ], |
| 631 | "subtitle": "A String", # Optional. Subtitle to the title. |
| 632 | "columnProperties": [ # Optional. Display properties for the columns in this table. |
| 633 | { # Column properties for TableCard. |
| 634 | "header": "A String", # Required. Column heading. |
| 635 | "horizontalAlignment": "A String", # Optional. Defines text alignment for all cells in this column. |
| 636 | }, |
| 637 | ], |
| 638 | "image": { # The image response message. # Optional. Image which should be displayed on the card. |
| 639 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 640 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 641 | # e.g., screen readers. |
| 642 | }, |
| 643 | "buttons": [ # Optional. List of buttons for the card. |
| 644 | { # The button object that appears at the bottom of a card. |
| 645 | "title": "A String", # Required. The title of the button. |
| 646 | "openUriAction": { # Opens the given URI. # Required. Action to take when a user taps on the button. |
| 647 | "uri": "A String", # Required. The HTTP or HTTPS scheme URI. |
| 648 | }, |
| 649 | }, |
| 650 | ], |
| 651 | }, |
| 652 | "carouselSelect": { # The card for presenting a carousel of options to select from. # The carousel card response for Actions on Google. |
| 653 | "items": [ # Required. Carousel items. |
| 654 | { # An item in the carousel. |
| 655 | "description": "A String", # Optional. The body text of the card. |
| 656 | "info": { # Additional info about the select item for when it is triggered in a # Required. Additional info about the option item. |
| 657 | # dialog. |
| 658 | "synonyms": [ # Optional. A list of synonyms that can also be used to trigger this |
| 659 | # item in dialog. |
| 660 | "A String", |
| 661 | ], |
| 662 | "key": "A String", # Required. A unique key that will be sent back to the agent if this |
| 663 | # response is given. |
| 664 | }, |
| 665 | "title": "A String", # Required. Title of the carousel item. |
| 666 | "image": { # The image response message. # Optional. The image to display. |
| 667 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 668 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 669 | # e.g., screen readers. |
| 670 | }, |
| 671 | }, |
| 672 | ], |
| 673 | }, |
| 674 | "linkOutSuggestion": { # The suggestion chip message that allows the user to jump out to the app # The link out suggestion chip for Actions on Google. |
| 675 | # or website associated with this agent. |
| 676 | "destinationName": "A String", # Required. The name of the app or site this chip is linking to. |
| 677 | "uri": "A String", # Required. The URI of the app or site to open when the user taps the |
| 678 | # suggestion chip. |
| 679 | }, |
| 680 | "browseCarouselCard": { # Browse Carousel Card for Actions on Google. # Browse carousel card for Actions on Google. |
| 681 | # https://developers.google.com/actions/assistant/responses#browsing_carousel |
| 682 | "items": [ # Required. List of items in the Browse Carousel Card. Minimum of two |
| 683 | # items, maximum of ten. |
| 684 | { # Browsing carousel tile |
| 685 | "openUriAction": { # Actions on Google action to open a given url. # Required. Action to present to the user. |
| 686 | "urlTypeHint": "A String", # Optional. Specifies the type of viewer that is used when opening |
| 687 | # the URL. Defaults to opening via web browser. |
| 688 | "url": "A String", # Required. URL |
| 689 | }, |
| 690 | "footer": "A String", # Optional. Text that appears at the bottom of the Browse Carousel |
| 691 | # Card. Maximum of one line of text. |
| 692 | "title": "A String", # Required. Title of the carousel item. Maximum of two lines of text. |
| 693 | "image": { # The image response message. # Optional. Hero image for the carousel item. |
| 694 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 695 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 696 | # e.g., screen readers. |
| 697 | }, |
| 698 | "description": "A String", # Optional. Description of the carousel item. Maximum of four lines of |
| 699 | # text. |
| 700 | }, |
| 701 | ], |
| 702 | "imageDisplayOptions": "A String", # Optional. Settings for displaying the image. Applies to every image in |
| 703 | # items. |
| 704 | }, |
| 705 | "simpleResponses": { # The collection of simple response candidates. # The voice and text-only responses for Actions on Google. |
| 706 | # This message in `QueryResult.fulfillment_messages` and |
| 707 | # `WebhookResponse.fulfillment_messages` should contain only one |
| 708 | # `SimpleResponse`. |
| 709 | "simpleResponses": [ # Required. The list of simple responses. |
| 710 | { # The simple response message containing speech or text. |
| 711 | "textToSpeech": "A String", # One of text_to_speech or ssml must be provided. The plain text of the |
| 712 | # speech output. Mutually exclusive with ssml. |
| 713 | "ssml": "A String", # One of text_to_speech or ssml must be provided. Structured spoken |
| 714 | # response to the user in the SSML format. Mutually exclusive with |
| 715 | # text_to_speech. |
| 716 | "displayText": "A String", # Optional. The text to display. |
| 717 | }, |
| 718 | ], |
| 719 | }, |
| 720 | }, |
| 721 | ], |
| 722 | "webhookPayload": { # If the query was fulfilled by a webhook call, this field is set to the |
| 723 | # value of the `payload` field returned in the webhook response. |
| 724 | "a_key": "", # Properties of the object. |
| 725 | }, |
| 726 | "action": "A String", # The action name from the matched intent. |
| 727 | "webhookSource": "A String", # If the query was fulfilled by a webhook call, this field is set to the |
| 728 | # value of the `source` field returned in the webhook response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 729 | "fulfillmentText": "A String", # The text to be pronounced to the user or shown on the screen. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 730 | # Note: This is a legacy field, `fulfillment_messages` should be preferred. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 731 | "parameters": { # The collection of extracted parameters. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 732 | # |
| 733 | # Depending on your protocol or client library language, this is a |
| 734 | # map, associative array, symbol table, dictionary, or JSON object |
| 735 | # composed of a collection of (MapKey, MapValue) pairs: |
| 736 | # |
| 737 | # - MapKey type: string |
| 738 | # - MapKey value: parameter name |
| 739 | # - MapValue type: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 740 | # - If parameter's entity type is a composite entity: map |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 741 | # - Else: string or number, depending on parameter value type |
| 742 | # - MapValue value: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 743 | # - If parameter's entity type is a composite entity: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 744 | # map from composite entity property names to property values |
| 745 | # - Else: parameter value |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 746 | "a_key": "", # Properties of the object. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 747 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 748 | "sentimentAnalysisResult": { # The result of sentiment analysis as configured by # The sentiment analysis result, which depends on the |
| 749 | # `sentiment_analysis_request_config` specified in the request. |
| 750 | # `sentiment_analysis_request_config`. |
| 751 | "queryTextSentiment": { # The sentiment, such as positive/negative feeling or association, for a unit # The sentiment analysis result for `query_text`. |
| 752 | # of analysis, such as the query text. |
| 753 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive |
| 754 | # sentiment). |
| 755 | "magnitude": 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute |
| 756 | # magnitude of sentiment, regardless of score (positive or negative). |
| 757 | }, |
| 758 | }, |
| 759 | "intentDetectionConfidence": 3.14, # The intent detection confidence. Values range from 0.0 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 760 | # (completely uncertain) to 1.0 (completely certain). |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 761 | # This value is for informational purpose only and is only used to |
| 762 | # help match the best intent within the classification threshold. |
| 763 | # This value may change for the same end-user expression at any time due to a |
| 764 | # model retraining or change in implementation. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 765 | # If there are `multiple knowledge_answers` messages, this value is set to |
| 766 | # the greatest `knowledgeAnswers.match_confidence` value in the list. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 767 | "allRequiredParamsPresent": True or False, # This field is set to: |
| 768 | # |
| 769 | # - `false` if the matched intent has required parameters and not all of |
| 770 | # the required parameter values have been collected. |
| 771 | # - `true` if all required parameter values have been collected, or if the |
| 772 | # matched intent doesn't contain any required parameters. |
| 773 | "queryText": "A String", # The original conversational query text: |
| 774 | # |
| 775 | # - If natural language text was provided as input, `query_text` contains |
| 776 | # a copy of the input. |
| 777 | # - If natural language speech audio was provided as input, `query_text` |
| 778 | # contains the speech recognition result. If speech recognizer produced |
| 779 | # multiple alternatives, a particular one is picked. |
| 780 | # - If automatic spell correction is enabled, `query_text` will contain the |
| 781 | # corrected user input. |
| 782 | "speechRecognitionConfidence": 3.14, # The Speech recognition confidence between 0.0 and 1.0. A higher number |
| 783 | # indicates an estimated greater likelihood that the recognized words are |
| 784 | # correct. The default of 0.0 is a sentinel value indicating that confidence |
| 785 | # was not set. |
| 786 | # |
| 787 | # This field is not guaranteed to be accurate or set. In particular this |
| 788 | # field isn't set for StreamingDetectIntent since the streaming endpoint has |
| 789 | # separate confidence estimates per portion of the audio in |
| 790 | # StreamingRecognitionResult. |
| 791 | "diagnosticInfo": { # Free-form diagnostic information for the associated detect intent request. |
| 792 | # The fields of this data can change without notice, so you should not write |
| 793 | # code that depends on its structure. |
| 794 | # The data may contain: |
| 795 | # |
| 796 | # - webhook call latency |
| 797 | # - webhook errors |
| 798 | "a_key": "", # Properties of the object. |
| 799 | }, |
| 800 | "intent": { # Represents an intent. # The intent that matched the conversational query. Some, not |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 801 | # all fields are filled in this message, including but not limited to: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 802 | # `name`, `display_name`, `end_interaction` and `is_fallback`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 803 | # Intents convert a number of user expressions or patterns into an action. An |
| 804 | # action is an extraction of a user command or sentence semantics. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 805 | "events": [ # Optional. The collection of event names that trigger the intent. |
| 806 | # If the collection of input contexts is not empty, all of the contexts must |
| 807 | # be present in the active user session for an event to trigger this intent. |
| 808 | # Event names are limited to 150 characters. |
| 809 | "A String", |
| 810 | ], |
| 811 | "parentFollowupIntentName": "A String", # Read-only after creation. The unique identifier of the parent intent in the |
| 812 | # chain of followup intents. You can set this field when creating an intent, |
| 813 | # for example with CreateIntent or |
| 814 | # BatchUpdateIntents, in order to make this |
| 815 | # intent a followup intent. |
| 816 | # |
| 817 | # It identifies the parent followup intent. |
| 818 | # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. |
| 819 | "priority": 42, # Optional. The priority of this intent. Higher numbers represent higher |
| 820 | # priorities. |
| 821 | # |
| 822 | # - If the supplied value is unspecified or 0, the service |
| 823 | # translates the value to 500,000, which corresponds to the |
| 824 | # `Normal` priority in the console. |
| 825 | # - If the supplied value is negative, the intent is ignored |
| 826 | # in runtime detect intent requests. |
| 827 | "outputContexts": [ # Optional. The collection of contexts that are activated when the intent |
| 828 | # is matched. Context messages in this collection should not set the |
| 829 | # parameters field. Setting the `lifespan_count` to 0 will reset the context |
| 830 | # when the intent is matched. |
| 831 | # Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`. |
| 832 | { # Represents a context. |
| 833 | "lifespanCount": 42, # Optional. The number of conversational query requests after which the |
| 834 | # context expires. The default is `0`. If set to `0`, the context expires |
| 835 | # immediately. Contexts expire automatically after 20 minutes if there |
| 836 | # are no matching queries. |
| 837 | "name": "A String", # Required. The unique identifier of the context. Format: |
| 838 | # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, |
| 839 | # or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 840 | # ID>/sessions/<Session ID>/contexts/<Context ID>`. |
| 841 | # |
| 842 | # The `Context ID` is always converted to lowercase, may only contain |
| 843 | # characters in a-zA-Z0-9_-% and may be at most 250 bytes long. |
| 844 | # |
| 845 | # If `Environment ID` is not specified, we assume default 'draft' |
| 846 | # environment. If `User ID` is not specified, we assume default '-' user. |
| 847 | # |
| 848 | # The following context names are reserved for internal use by Dialogflow. |
| 849 | # You should not use these contexts or create contexts with these names: |
| 850 | # |
| 851 | # * `__system_counters__` |
| 852 | # * `*_id_dialog_context` |
| 853 | # * `*_dialog_params_size` |
| 854 | "parameters": { # Optional. The collection of parameters associated with this context. |
| 855 | # |
| 856 | # Depending on your protocol or client library language, this is a |
| 857 | # map, associative array, symbol table, dictionary, or JSON object |
| 858 | # composed of a collection of (MapKey, MapValue) pairs: |
| 859 | # |
| 860 | # - MapKey type: string |
| 861 | # - MapKey value: parameter name |
| 862 | # - MapValue type: |
| 863 | # - If parameter's entity type is a composite entity: map |
| 864 | # - Else: string or number, depending on parameter value type |
| 865 | # - MapValue value: |
| 866 | # - If parameter's entity type is a composite entity: |
| 867 | # map from composite entity property names to property values |
| 868 | # - Else: parameter value |
| 869 | "a_key": "", # Properties of the object. |
| 870 | }, |
| 871 | }, |
| 872 | ], |
| 873 | "defaultResponsePlatforms": [ # Optional. The list of platforms for which the first responses will be |
| 874 | # copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform). |
| 875 | "A String", |
| 876 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 877 | "action": "A String", # Optional. The name of the action associated with the intent. |
| 878 | # Note: The action name must not contain whitespaces. |
| 879 | "name": "A String", # Optional. The unique identifier of this intent. |
| 880 | # Required for Intents.UpdateIntent and Intents.BatchUpdateIntents |
| 881 | # methods. |
| 882 | # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 883 | "messages": [ # Optional. The collection of rich messages corresponding to the |
| 884 | # `Response` field in the Dialogflow console. |
| 885 | { # A rich response message. |
| 886 | # Corresponds to the intent `Response` field in the Dialogflow console. |
| 887 | # For more information, see |
| 888 | # [Rich response |
| 889 | # messages](https://cloud.google.com/dialogflow/docs/intents-rich-messages). |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 890 | "mediaContent": { # The media content card for Actions on Google. # The media content card for Actions on Google. |
| 891 | "mediaType": "A String", # Optional. What type of media is the content (ie "audio"). |
| 892 | "mediaObjects": [ # Required. List of media objects. |
| 893 | { # Response media object for media content card. |
| 894 | "name": "A String", # Required. Name of media card. |
| 895 | "description": "A String", # Optional. Description of media card. |
| 896 | "contentUrl": "A String", # Required. Url where the media is stored. |
| 897 | "icon": { # The image response message. # Optional. Icon to display above media content. |
| 898 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 899 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 900 | # e.g., screen readers. |
| 901 | }, |
| 902 | "largeImage": { # The image response message. # Optional. Image to display above media content. |
| 903 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 904 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 905 | # e.g., screen readers. |
| 906 | }, |
| 907 | }, |
| 908 | ], |
| 909 | }, |
| 910 | "image": { # The image response message. # The image response. |
| 911 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 912 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 913 | # e.g., screen readers. |
| 914 | }, |
| 915 | "payload": { # A custom platform-specific response. |
| 916 | "a_key": "", # Properties of the object. |
| 917 | }, |
| 918 | "text": { # The text response message. # The text response. |
| 919 | "text": [ # Optional. The collection of the agent's responses. |
| 920 | "A String", |
| 921 | ], |
| 922 | }, |
| 923 | "platform": "A String", # Optional. The platform that this message is intended for. |
| 924 | "suggestions": { # The collection of suggestions. # The suggestion chips for Actions on Google. |
| 925 | "suggestions": [ # Required. The list of suggested replies. |
| 926 | { # The suggestion chip message that the user can tap to quickly post a reply |
| 927 | # to the conversation. |
| 928 | "title": "A String", # Required. The text shown the in the suggestion chip. |
| 929 | }, |
| 930 | ], |
| 931 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 932 | "listSelect": { # The card for presenting a list of options to select from. # The list card response for Actions on Google. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 933 | "subtitle": "A String", # Optional. Subtitle of the list. |
| 934 | "items": [ # Required. List items. |
| 935 | { # An item in the list. |
| 936 | "title": "A String", # Required. The title of the list item. |
| 937 | "image": { # The image response message. # Optional. The image to display. |
| 938 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 939 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 940 | # e.g., screen readers. |
| 941 | }, |
| 942 | "description": "A String", # Optional. The main text describing the item. |
| 943 | "info": { # Additional info about the select item for when it is triggered in a # Required. Additional information about this option. |
| 944 | # dialog. |
| 945 | "synonyms": [ # Optional. A list of synonyms that can also be used to trigger this |
| 946 | # item in dialog. |
| 947 | "A String", |
| 948 | ], |
| 949 | "key": "A String", # Required. A unique key that will be sent back to the agent if this |
| 950 | # response is given. |
| 951 | }, |
| 952 | }, |
| 953 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 954 | "title": "A String", # Optional. The overall title of the list. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 955 | }, |
| 956 | "quickReplies": { # The quick replies response message. # The quick replies response. |
| 957 | "title": "A String", # Optional. The title of the collection of quick replies. |
| 958 | "quickReplies": [ # Optional. The collection of quick replies. |
| 959 | "A String", |
| 960 | ], |
| 961 | }, |
| 962 | "card": { # The card response message. # The card response. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 963 | "imageUri": "A String", # Optional. The public URI to an image file for the card. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 964 | "title": "A String", # Optional. The title of the card. |
| 965 | "buttons": [ # Optional. The collection of card buttons. |
| 966 | { # Contains information about a button. |
| 967 | "text": "A String", # Optional. The text to show on the button. |
| 968 | "postback": "A String", # Optional. The text to send back to the Dialogflow API or a URI to |
| 969 | # open. |
| 970 | }, |
| 971 | ], |
| 972 | "subtitle": "A String", # Optional. The subtitle of the card. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 973 | }, |
| 974 | "basicCard": { # The basic card message. Useful for displaying information. # The basic card response for Actions on Google. |
| 975 | "title": "A String", # Optional. The title of the card. |
| 976 | "image": { # The image response message. # Optional. The image for the card. |
| 977 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 978 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 979 | # e.g., screen readers. |
| 980 | }, |
| 981 | "formattedText": "A String", # Required, unless image is present. The body text of the card. |
| 982 | "buttons": [ # Optional. The collection of card buttons. |
| 983 | { # The button object that appears at the bottom of a card. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 984 | "title": "A String", # Required. The title of the button. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 985 | "openUriAction": { # Opens the given URI. # Required. Action to take when a user taps on the button. |
| 986 | "uri": "A String", # Required. The HTTP or HTTPS scheme URI. |
| 987 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 988 | }, |
| 989 | ], |
| 990 | "subtitle": "A String", # Optional. The subtitle of the card. |
| 991 | }, |
| 992 | "tableCard": { # Table card for Actions on Google. # Table card for Actions on Google. |
| 993 | "title": "A String", # Required. Title of the card. |
| 994 | "rows": [ # Optional. Rows in this table of data. |
| 995 | { # Row of TableCard. |
| 996 | "dividerAfter": True or False, # Optional. Whether to add a visual divider after this row. |
| 997 | "cells": [ # Optional. List of cells that make up this row. |
| 998 | { # Cell of TableCardRow. |
| 999 | "text": "A String", # Required. Text in this cell. |
| 1000 | }, |
| 1001 | ], |
| 1002 | }, |
| 1003 | ], |
| 1004 | "subtitle": "A String", # Optional. Subtitle to the title. |
| 1005 | "columnProperties": [ # Optional. Display properties for the columns in this table. |
| 1006 | { # Column properties for TableCard. |
| 1007 | "header": "A String", # Required. Column heading. |
| 1008 | "horizontalAlignment": "A String", # Optional. Defines text alignment for all cells in this column. |
| 1009 | }, |
| 1010 | ], |
| 1011 | "image": { # The image response message. # Optional. Image which should be displayed on the card. |
| 1012 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 1013 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 1014 | # e.g., screen readers. |
| 1015 | }, |
| 1016 | "buttons": [ # Optional. List of buttons for the card. |
| 1017 | { # The button object that appears at the bottom of a card. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1018 | "title": "A String", # Required. The title of the button. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1019 | "openUriAction": { # Opens the given URI. # Required. Action to take when a user taps on the button. |
| 1020 | "uri": "A String", # Required. The HTTP or HTTPS scheme URI. |
| 1021 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1022 | }, |
| 1023 | ], |
| 1024 | }, |
| 1025 | "carouselSelect": { # The card for presenting a carousel of options to select from. # The carousel card response for Actions on Google. |
| 1026 | "items": [ # Required. Carousel items. |
| 1027 | { # An item in the carousel. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1028 | "description": "A String", # Optional. The body text of the card. |
| 1029 | "info": { # Additional info about the select item for when it is triggered in a # Required. Additional info about the option item. |
| 1030 | # dialog. |
| 1031 | "synonyms": [ # Optional. A list of synonyms that can also be used to trigger this |
| 1032 | # item in dialog. |
| 1033 | "A String", |
| 1034 | ], |
| 1035 | "key": "A String", # Required. A unique key that will be sent back to the agent if this |
| 1036 | # response is given. |
| 1037 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1038 | "title": "A String", # Required. Title of the carousel item. |
| 1039 | "image": { # The image response message. # Optional. The image to display. |
| 1040 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 1041 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 1042 | # e.g., screen readers. |
| 1043 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1044 | }, |
| 1045 | ], |
| 1046 | }, |
| 1047 | "linkOutSuggestion": { # The suggestion chip message that allows the user to jump out to the app # The link out suggestion chip for Actions on Google. |
| 1048 | # or website associated with this agent. |
| 1049 | "destinationName": "A String", # Required. The name of the app or site this chip is linking to. |
| 1050 | "uri": "A String", # Required. The URI of the app or site to open when the user taps the |
| 1051 | # suggestion chip. |
| 1052 | }, |
| 1053 | "browseCarouselCard": { # Browse Carousel Card for Actions on Google. # Browse carousel card for Actions on Google. |
| 1054 | # https://developers.google.com/actions/assistant/responses#browsing_carousel |
| 1055 | "items": [ # Required. List of items in the Browse Carousel Card. Minimum of two |
| 1056 | # items, maximum of ten. |
| 1057 | { # Browsing carousel tile |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1058 | "openUriAction": { # Actions on Google action to open a given url. # Required. Action to present to the user. |
| 1059 | "urlTypeHint": "A String", # Optional. Specifies the type of viewer that is used when opening |
| 1060 | # the URL. Defaults to opening via web browser. |
| 1061 | "url": "A String", # Required. URL |
| 1062 | }, |
| 1063 | "footer": "A String", # Optional. Text that appears at the bottom of the Browse Carousel |
| 1064 | # Card. Maximum of one line of text. |
| 1065 | "title": "A String", # Required. Title of the carousel item. Maximum of two lines of text. |
| 1066 | "image": { # The image response message. # Optional. Hero image for the carousel item. |
| 1067 | "imageUri": "A String", # Optional. The public URI to an image file. |
| 1068 | "accessibilityText": "A String", # Optional. A text description of the image to be used for accessibility, |
| 1069 | # e.g., screen readers. |
| 1070 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1071 | "description": "A String", # Optional. Description of the carousel item. Maximum of four lines of |
| 1072 | # text. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1073 | }, |
| 1074 | ], |
| 1075 | "imageDisplayOptions": "A String", # Optional. Settings for displaying the image. Applies to every image in |
| 1076 | # items. |
| 1077 | }, |
| 1078 | "simpleResponses": { # The collection of simple response candidates. # The voice and text-only responses for Actions on Google. |
| 1079 | # This message in `QueryResult.fulfillment_messages` and |
| 1080 | # `WebhookResponse.fulfillment_messages` should contain only one |
| 1081 | # `SimpleResponse`. |
| 1082 | "simpleResponses": [ # Required. The list of simple responses. |
| 1083 | { # The simple response message containing speech or text. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1084 | "textToSpeech": "A String", # One of text_to_speech or ssml must be provided. The plain text of the |
| 1085 | # speech output. Mutually exclusive with ssml. |
| 1086 | "ssml": "A String", # One of text_to_speech or ssml must be provided. Structured spoken |
| 1087 | # response to the user in the SSML format. Mutually exclusive with |
| 1088 | # text_to_speech. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1089 | "displayText": "A String", # Optional. The text to display. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1090 | }, |
| 1091 | ], |
| 1092 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1093 | }, |
| 1094 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1095 | "webhookState": "A String", # Optional. Indicates whether webhooks are enabled for the intent. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1096 | "inputContextNames": [ # Optional. The list of context names required for this intent to be |
| 1097 | # triggered. |
| 1098 | # Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`. |
| 1099 | "A String", |
| 1100 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1101 | "followupIntentInfo": [ # Read-only. Information about all followup intents that have this intent as |
| 1102 | # a direct or indirect parent. We populate this field only in the output. |
| 1103 | { # Represents a single followup intent in the chain. |
| 1104 | "followupIntentName": "A String", # The unique identifier of the followup intent. |
| 1105 | # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. |
| 1106 | "parentFollowupIntentName": "A String", # The unique identifier of the followup intent's parent. |
| 1107 | # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1108 | }, |
| 1109 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1110 | "rootFollowupIntentName": "A String", # Read-only. The unique identifier of the root intent in the chain of |
| 1111 | # followup intents. It identifies the correct followup intents chain for |
| 1112 | # this intent. We populate this field only in the output. |
| 1113 | # |
| 1114 | # Format: `projects/<Project ID>/agent/intents/<Intent ID>`. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1115 | "displayName": "A String", # Required. The name of this intent. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1116 | "mlDisabled": True or False, # Optional. Indicates whether Machine Learning is disabled for the intent. |
| 1117 | # Note: If `ml_disabled` setting is set to true, then this intent is not |
| 1118 | # taken into account during inference in `ML ONLY` match mode. Also, |
| 1119 | # auto-markup in the UI is turned off. |
| 1120 | "isFallback": True or False, # Optional. Indicates whether this is a fallback intent. |
| 1121 | "trainingPhrases": [ # Optional. The collection of examples that the agent is |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1122 | # trained on. |
| 1123 | { # Represents an example that the agent is trained on. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1124 | "name": "A String", # Output only. The unique identifier of this training phrase. |
| 1125 | "timesAddedCount": 42, # Optional. Indicates how many times this example was added to |
| 1126 | # the intent. Each time a developer adds an existing sample by editing an |
| 1127 | # intent or training, this counter is increased. |
| 1128 | "type": "A String", # Required. The type of the training phrase. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1129 | "parts": [ # Required. The ordered list of training phrase parts. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1130 | # The parts are concatenated in order to form the training phrase. |
| 1131 | # |
| 1132 | # Note: The API does not automatically annotate training phrases like the |
| 1133 | # Dialogflow Console does. |
| 1134 | # |
| 1135 | # Note: Do not forget to include whitespace at part boundaries, |
| 1136 | # so the training phrase is well formatted when the parts are concatenated. |
| 1137 | # |
| 1138 | # If the training phrase does not need to be annotated with parameters, |
| 1139 | # you just need a single part with only the Part.text field set. |
| 1140 | # |
| 1141 | # If you want to annotate the training phrase, you must create multiple |
| 1142 | # parts, where the fields of each part are populated in one of two ways: |
| 1143 | # |
| 1144 | # - `Part.text` is set to a part of the phrase that has no parameters. |
| 1145 | # - `Part.text` is set to a part of the phrase that you want to annotate, |
| 1146 | # and the `entity_type`, `alias`, and `user_defined` fields are all |
| 1147 | # set. |
| 1148 | { # Represents a part of a training phrase. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1149 | "text": "A String", # Required. The text for this part. |
| 1150 | "entityType": "A String", # Optional. The entity type name prefixed with `@`. |
| 1151 | # This field is required for annotated parts of the training phrase. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1152 | "alias": "A String", # Optional. The parameter name for the value extracted from the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1153 | # annotated part of the example. |
| 1154 | # This field is required for annotated parts of the training phrase. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1155 | "userDefined": True or False, # Optional. Indicates whether the text was manually annotated. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1156 | # This field is set to true when the Dialogflow Console is used to |
| 1157 | # manually annotate the part. When creating an annotated part with the |
| 1158 | # API, you must set this to true. |
| 1159 | }, |
| 1160 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1161 | }, |
| 1162 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1163 | "resetContexts": True or False, # Optional. Indicates whether to delete all contexts in the current |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1164 | # session when this intent is matched. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1165 | "parameters": [ # Optional. The collection of parameters associated with the intent. |
| 1166 | { # Represents intent parameters. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1167 | "value": "A String", # Optional. The definition of the parameter value. It can be: |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1168 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1169 | # - a constant string, |
| 1170 | # - a parameter value defined as `$parameter_name`, |
| 1171 | # - an original parameter value defined as `$parameter_name.original`, |
| 1172 | # - a parameter value from some context defined as |
| 1173 | # `#context_name.parameter_name`. |
| 1174 | "displayName": "A String", # Required. The name of the parameter. |
| 1175 | "entityTypeDisplayName": "A String", # Optional. The name of the entity type, prefixed with `@`, that |
| 1176 | # describes values of the parameter. If the parameter is |
| 1177 | # required, this must be provided. |
| 1178 | "prompts": [ # Optional. The collection of prompts that the agent can present to the |
| 1179 | # user in order to collect a value for the parameter. |
| 1180 | "A String", |
| 1181 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1182 | "mandatory": True or False, # Optional. Indicates whether the parameter is required. That is, |
| 1183 | # whether the intent cannot be completed without collecting the parameter |
| 1184 | # value. |
| 1185 | "defaultValue": "A String", # Optional. The default value to use when the `value` yields an empty |
| 1186 | # result. |
| 1187 | # Default values can be extracted from contexts by using the following |
| 1188 | # syntax: `#context_name.parameter_name`. |
| 1189 | "name": "A String", # The unique identifier of this parameter. |
| 1190 | "isList": True or False, # Optional. Indicates whether the parameter represents a list of values. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1191 | }, |
| 1192 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1193 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1194 | "languageCode": "A String", # The language that was triggered during intent detection. |
| 1195 | # See [Language |
| 1196 | # Support](https://cloud.google.com/dialogflow/docs/reference/language) |
| 1197 | # for a list of the currently supported language codes. |
| 1198 | "outputContexts": [ # The collection of output contexts. If applicable, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1199 | # `output_contexts.parameters` contains entries with name |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1200 | # `<parameter name>.original` containing the original parameter values |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1201 | # before the query. |
| 1202 | { # Represents a context. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1203 | "lifespanCount": 42, # Optional. The number of conversational query requests after which the |
| 1204 | # context expires. The default is `0`. If set to `0`, the context expires |
| 1205 | # immediately. Contexts expire automatically after 20 minutes if there |
| 1206 | # are no matching queries. |
| 1207 | "name": "A String", # Required. The unique identifier of the context. Format: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1208 | # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`, |
| 1209 | # or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User |
| 1210 | # ID>/sessions/<Session ID>/contexts/<Context ID>`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1211 | # |
| 1212 | # The `Context ID` is always converted to lowercase, may only contain |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1213 | # characters in a-zA-Z0-9_-% and may be at most 250 bytes long. |
| 1214 | # |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1215 | # If `Environment ID` is not specified, we assume default 'draft' |
| 1216 | # environment. If `User ID` is not specified, we assume default '-' user. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1217 | # |
| 1218 | # The following context names are reserved for internal use by Dialogflow. |
| 1219 | # You should not use these contexts or create contexts with these names: |
| 1220 | # |
| 1221 | # * `__system_counters__` |
| 1222 | # * `*_id_dialog_context` |
| 1223 | # * `*_dialog_params_size` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1224 | "parameters": { # Optional. The collection of parameters associated with this context. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1225 | # |
| 1226 | # Depending on your protocol or client library language, this is a |
| 1227 | # map, associative array, symbol table, dictionary, or JSON object |
| 1228 | # composed of a collection of (MapKey, MapValue) pairs: |
| 1229 | # |
| 1230 | # - MapKey type: string |
| 1231 | # - MapKey value: parameter name |
| 1232 | # - MapValue type: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1233 | # - If parameter's entity type is a composite entity: map |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1234 | # - Else: string or number, depending on parameter value type |
| 1235 | # - MapValue value: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1236 | # - If parameter's entity type is a composite entity: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1237 | # map from composite entity property names to property values |
| 1238 | # - Else: parameter value |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1239 | "a_key": "", # Properties of the object. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1240 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1241 | }, |
| 1242 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1243 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1244 | "outputAudio": "A String", # The audio data bytes encoded as specified in the request. |
| 1245 | # Note: The output audio is generated based on the values of default platform |
| 1246 | # text responses found in the `query_result.fulfillment_messages` field. If |
| 1247 | # multiple default text responses exist, they will be concatenated when |
| 1248 | # generating audio. If no default platform text responses exist, the |
| 1249 | # generated audio content will be empty. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 1250 | # |
| 1251 | # In some scenarios, multiple output audio fields may be present in the |
| 1252 | # response structure. In these cases, only the top-most-level audio output |
| 1253 | # has content. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1254 | "webhookStatus": { # The `Status` type defines a logical error model that is suitable for # Specifies the status of the webhook request. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1255 | # different programming environments, including REST APIs and RPC APIs. It is |
| 1256 | # used by [gRPC](https://github.com/grpc). Each `Status` message contains |
| 1257 | # three pieces of data: error code, error message, and error details. |
| 1258 | # |
| 1259 | # You can find out more about this error model and how to work with it in the |
| 1260 | # [API Design Guide](https://cloud.google.com/apis/design/errors). |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1261 | "details": [ # A list of messages that carry the error details. There is a common set of |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1262 | # message types for APIs to use. |
| 1263 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1264 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1265 | }, |
| 1266 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1267 | "code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 1268 | "message": "A String", # A developer-facing error message, which should be in English. Any |
| 1269 | # user-facing error message should be localized and sent in the |
| 1270 | # google.rpc.Status.details field, or localized by the client. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1271 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1272 | "responseId": "A String", # The unique identifier of the response. It can be used to |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1273 | # locate a response in the training example set or for reporting issues. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1274 | }</pre> |
| 1275 | </div> |
| 1276 | |
| 1277 | </body></html> |