1<html><body> 2<style> 3 4body, 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 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, 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></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="dialogflow_v2.projects.agent.entityTypes.html">entityTypes()</a></code> 79</p> 80<p class="firstline">Returns the entityTypes Resource.</p> 81 82<p class="toc_element"> 83 <code><a href="dialogflow_v2.projects.agent.intents.html">intents()</a></code> 84</p> 85<p class="firstline">Returns the intents Resource.</p> 86 87<p class="toc_element"> 88 <code><a href="dialogflow_v2.projects.agent.sessions.html">sessions()</a></code> 89</p> 90<p class="firstline">Returns the sessions Resource.</p> 91 92<p class="toc_element"> 93 <code><a href="#export">export(parent, body, x__xgafv=None)</a></code></p> 94<p class="firstline">Exports the specified agent to a ZIP file.</p> 95<p class="toc_element"> 96 <code><a href="#import_">import_(parent, body, x__xgafv=None)</a></code></p> 97<p class="firstline">Imports the specified agent from a ZIP file.</p> 98<p class="toc_element"> 99 <code><a href="#restore">restore(parent, body, x__xgafv=None)</a></code></p> 100<p class="firstline">Restores the specified agent from a ZIP file.</p> 101<p class="toc_element"> 102 <code><a href="#search">search(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 103<p class="firstline">Returns the list of agents.</p> 104<p class="toc_element"> 105 <code><a href="#search_next">search_next(previous_request, previous_response)</a></code></p> 106<p class="firstline">Retrieves the next page of results.</p> 107<p class="toc_element"> 108 <code><a href="#train">train(parent, body=None, x__xgafv=None)</a></code></p> 109<p class="firstline">Trains the specified agent.</p> 110<h3>Method Details</h3> 111<div class="method"> 112 <code class="details" id="export">export(parent, body, x__xgafv=None)</code> 113 <pre>Exports the specified agent to a ZIP file. 114 115Operation <response: ExportAgentResponse> 116 117Args: 118 parent: string, Required. The project that the agent to export is associated with. 119Format: `projects/<Project ID>`. (required) 120 body: object, The request body. (required) 121 The object takes the form of: 122 123{ # The request message for Agents.ExportAgent. 124 "agentUri": "A String", # Optional. The 125 # [Google Cloud Storage](https://cloud.google.com/storage/docs/) 126 # URI to export the agent to. 127 # The format of this URI must be `gs://<bucket-name>/<object-name>`. 128 # If left unspecified, the serialized agent is returned inline. 129 } 130 131 x__xgafv: string, V1 error format. 132 Allowed values 133 1 - v1 error format 134 2 - v2 error format 135 136Returns: 137 An object of the form: 138 139 { # This resource represents a long-running operation that is the result of a 140 # network API call. 141 "metadata": { # Service-specific metadata associated with the operation. It typically 142 # contains progress information and common metadata such as create time. 143 # Some services might not provide such metadata. Any method that returns a 144 # long-running operation should document the metadata type, if any. 145 "a_key": "", # Properties of the object. Contains field @type with type URL. 146 }, 147 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. 148 # different programming environments, including REST APIs and RPC APIs. It is 149 # used by [gRPC](https://github.com/grpc). Each `Status` message contains 150 # three pieces of data: error code, error message, and error details. 151 # 152 # You can find out more about this error model and how to work with it in the 153 # [API Design Guide](https://cloud.google.com/apis/design/errors). 154 "message": "A String", # A developer-facing error message, which should be in English. Any 155 # user-facing error message should be localized and sent in the 156 # google.rpc.Status.details field, or localized by the client. 157 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 158 "details": [ # A list of messages that carry the error details. There is a common set of 159 # message types for APIs to use. 160 { 161 "a_key": "", # Properties of the object. Contains field @type with type URL. 162 }, 163 ], 164 }, 165 "done": True or False, # If the value is `false`, it means the operation is still in progress. 166 # If `true`, the operation is completed, and either `error` or `response` is 167 # available. 168 "response": { # The normal response of the operation in case of success. If the original 169 # method returns no data on success, such as `Delete`, the response is 170 # `google.protobuf.Empty`. If the original method is standard 171 # `Get`/`Create`/`Update`, the response should be the resource. For other 172 # methods, the response should have the type `XxxResponse`, where `Xxx` 173 # is the original method name. For example, if the original method name 174 # is `TakeSnapshot()`, the inferred response type is 175 # `TakeSnapshotResponse`. 176 "a_key": "", # Properties of the object. Contains field @type with type URL. 177 }, 178 "name": "A String", # The server-assigned name, which is only unique within the same service that 179 # originally returns it. If you use the default HTTP mapping, the 180 # `name` should be a resource name ending with `operations/{unique_id}`. 181 }</pre> 182</div> 183 184<div class="method"> 185 <code class="details" id="import_">import_(parent, body, x__xgafv=None)</code> 186 <pre>Imports the specified agent from a ZIP file. 187 188Uploads new intents and entity types without deleting the existing ones. 189Intents and entity types with the same name are replaced with the new 190versions from ImportAgentRequest. 191 192Operation <response: google.protobuf.Empty> 193 194Args: 195 parent: string, Required. The project that the agent to import is associated with. 196Format: `projects/<Project ID>`. (required) 197 body: object, The request body. (required) 198 The object takes the form of: 199 200{ # The request message for Agents.ImportAgent. 201 "agentUri": "A String", # The URI to a Google Cloud Storage file containing the agent to import. 202 # Note: The URI must start with "gs://". 203 "agentContent": "A String", # The agent to import. 204 # 205 # Example for how to import an agent via the command line: 206 # <pre>curl \ 207 # 'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:import\ 208 # -X POST \ 209 # -H 'Authorization: Bearer '$(gcloud auth application-default 210 # print-access-token) \ 211 # -H 'Accept: application/json' \ 212 # -H 'Content-Type: application/json' \ 213 # --compressed \ 214 # --data-binary "{ 215 # 'agentContent': '$(cat <agent zip file> | base64 -w 0)' 216 # }"</pre> 217 } 218 219 x__xgafv: string, V1 error format. 220 Allowed values 221 1 - v1 error format 222 2 - v2 error format 223 224Returns: 225 An object of the form: 226 227 { # This resource represents a long-running operation that is the result of a 228 # network API call. 229 "metadata": { # Service-specific metadata associated with the operation. It typically 230 # contains progress information and common metadata such as create time. 231 # Some services might not provide such metadata. Any method that returns a 232 # long-running operation should document the metadata type, if any. 233 "a_key": "", # Properties of the object. Contains field @type with type URL. 234 }, 235 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. 236 # different programming environments, including REST APIs and RPC APIs. It is 237 # used by [gRPC](https://github.com/grpc). Each `Status` message contains 238 # three pieces of data: error code, error message, and error details. 239 # 240 # You can find out more about this error model and how to work with it in the 241 # [API Design Guide](https://cloud.google.com/apis/design/errors). 242 "message": "A String", # A developer-facing error message, which should be in English. Any 243 # user-facing error message should be localized and sent in the 244 # google.rpc.Status.details field, or localized by the client. 245 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 246 "details": [ # A list of messages that carry the error details. There is a common set of 247 # message types for APIs to use. 248 { 249 "a_key": "", # Properties of the object. Contains field @type with type URL. 250 }, 251 ], 252 }, 253 "done": True or False, # If the value is `false`, it means the operation is still in progress. 254 # If `true`, the operation is completed, and either `error` or `response` is 255 # available. 256 "response": { # The normal response of the operation in case of success. If the original 257 # method returns no data on success, such as `Delete`, the response is 258 # `google.protobuf.Empty`. If the original method is standard 259 # `Get`/`Create`/`Update`, the response should be the resource. For other 260 # methods, the response should have the type `XxxResponse`, where `Xxx` 261 # is the original method name. For example, if the original method name 262 # is `TakeSnapshot()`, the inferred response type is 263 # `TakeSnapshotResponse`. 264 "a_key": "", # Properties of the object. Contains field @type with type URL. 265 }, 266 "name": "A String", # The server-assigned name, which is only unique within the same service that 267 # originally returns it. If you use the default HTTP mapping, the 268 # `name` should be a resource name ending with `operations/{unique_id}`. 269 }</pre> 270</div> 271 272<div class="method"> 273 <code class="details" id="restore">restore(parent, body, x__xgafv=None)</code> 274 <pre>Restores the specified agent from a ZIP file. 275 276Replaces the current agent version with a new one. All the intents and 277entity types in the older version are deleted. 278 279Operation <response: google.protobuf.Empty> 280 281Args: 282 parent: string, Required. The project that the agent to restore is associated with. 283Format: `projects/<Project ID>`. (required) 284 body: object, The request body. (required) 285 The object takes the form of: 286 287{ # The request message for Agents.RestoreAgent. 288 "agentUri": "A String", # The URI to a Google Cloud Storage file containing the agent to restore. 289 # Note: The URI must start with "gs://". 290 "agentContent": "A String", # The agent to restore. 291 # 292 # Example for how to restore an agent via the command line: 293 # <pre>curl \ 294 # 'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:restore\ 295 # -X POST \ 296 # -H 'Authorization: Bearer '$(gcloud auth application-default 297 # print-access-token) \ 298 # -H 'Accept: application/json' \ 299 # -H 'Content-Type: application/json' \ 300 # --compressed \ 301 # --data-binary "{ 302 # 'agentContent': '$(cat <agent zip file> | base64 -w 0)' 303 # }"</pre> 304 } 305 306 x__xgafv: string, V1 error format. 307 Allowed values 308 1 - v1 error format 309 2 - v2 error format 310 311Returns: 312 An object of the form: 313 314 { # This resource represents a long-running operation that is the result of a 315 # network API call. 316 "metadata": { # Service-specific metadata associated with the operation. It typically 317 # contains progress information and common metadata such as create time. 318 # Some services might not provide such metadata. Any method that returns a 319 # long-running operation should document the metadata type, if any. 320 "a_key": "", # Properties of the object. Contains field @type with type URL. 321 }, 322 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. 323 # different programming environments, including REST APIs and RPC APIs. It is 324 # used by [gRPC](https://github.com/grpc). Each `Status` message contains 325 # three pieces of data: error code, error message, and error details. 326 # 327 # You can find out more about this error model and how to work with it in the 328 # [API Design Guide](https://cloud.google.com/apis/design/errors). 329 "message": "A String", # A developer-facing error message, which should be in English. Any 330 # user-facing error message should be localized and sent in the 331 # google.rpc.Status.details field, or localized by the client. 332 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 333 "details": [ # A list of messages that carry the error details. There is a common set of 334 # message types for APIs to use. 335 { 336 "a_key": "", # Properties of the object. Contains field @type with type URL. 337 }, 338 ], 339 }, 340 "done": True or False, # If the value is `false`, it means the operation is still in progress. 341 # If `true`, the operation is completed, and either `error` or `response` is 342 # available. 343 "response": { # The normal response of the operation in case of success. If the original 344 # method returns no data on success, such as `Delete`, the response is 345 # `google.protobuf.Empty`. If the original method is standard 346 # `Get`/`Create`/`Update`, the response should be the resource. For other 347 # methods, the response should have the type `XxxResponse`, where `Xxx` 348 # is the original method name. For example, if the original method name 349 # is `TakeSnapshot()`, the inferred response type is 350 # `TakeSnapshotResponse`. 351 "a_key": "", # Properties of the object. Contains field @type with type URL. 352 }, 353 "name": "A String", # The server-assigned name, which is only unique within the same service that 354 # originally returns it. If you use the default HTTP mapping, the 355 # `name` should be a resource name ending with `operations/{unique_id}`. 356 }</pre> 357</div> 358 359<div class="method"> 360 <code class="details" id="search">search(parent, pageSize=None, pageToken=None, x__xgafv=None)</code> 361 <pre>Returns the list of agents. 362 363Since there is at most one conversational agent per project, this method is 364useful primarily for listing all agents across projects the caller has 365access to. One can achieve that with a wildcard project collection id "-". 366Refer to [List 367Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections). 368 369Args: 370 parent: string, Required. The project to list agents from. 371Format: `projects/<Project ID or '-'>`. (required) 372 pageSize: integer, Optional. The maximum number of items to return in a single page. By 373default 100 and at most 1000. 374 pageToken: string, Optional. The next_page_token value returned from a previous list request. 375 x__xgafv: string, V1 error format. 376 Allowed values 377 1 - v1 error format 378 2 - v2 error format 379 380Returns: 381 An object of the form: 382 383 { # The response message for Agents.SearchAgents. 384 "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no 385 # more results in the list. 386 "agents": [ # The list of agents. There will be a maximum number of items returned based 387 # on the page_size field in the request. 388 { # Represents a conversational agent. 389 "avatarUri": "A String", # Optional. The URI of the agent's avatar. 390 # Avatars are used throughout the Dialogflow console and in the self-hosted 391 # [Web 392 # Demo](https://cloud.google.com/dialogflow-enterprise/docs/integrations/web-demo) 393 # integration. 394 "displayName": "A String", # Required. The name of this agent. 395 "description": "A String", # Optional. The description of this agent. 396 # The maximum length is 500 characters. If exceeded, the request is rejected. 397 "parent": "A String", # Required. The project of this agent. 398 # Format: `projects/<Project ID>`. 399 "defaultLanguageCode": "A String", # Required. The default language of the agent as a language tag. See 400 # [Language 401 # Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language) 402 # for a list of the currently supported language codes. This field cannot be 403 # set by the `Update` method. 404 "apiVersion": "A String", # Optional. API version displayed in Dialogflow console. If not specified, 405 # V2 API is assumed. Clients are free to query different service endpoints 406 # for different API versions. However, bots connectors and webhook calls will 407 # follow the specified API version. 408 "enableLogging": True or False, # Optional. Determines whether this agent should log conversation queries. 409 "matchMode": "A String", # Optional. Determines how intents are detected from user queries. 410 "supportedLanguageCodes": [ # Optional. The list of all languages supported by this agent (except for the 411 # `default_language_code`). 412 "A String", 413 ], 414 "tier": "A String", # Optional. The agent tier. If not specified, TIER_STANDARD is assumed. 415 "timeZone": "A String", # Required. The time zone of this agent from the 416 # [time zone database](https://www.iana.org/time-zones), e.g., 417 # America/New_York, Europe/Paris. 418 "classificationThreshold": 3.14, # Optional. To filter out false positive results and still get variety in 419 # matched natural language inputs for your agent, you can tune the machine 420 # learning classification threshold. If the returned score value is less than 421 # the threshold value, then a fallback intent will be triggered or, if there 422 # are no fallback intents defined, no intent will be triggered. The score 423 # values range from 0.0 (completely uncertain) to 1.0 (completely certain). 424 # If set to 0.0, the default of 0.3 is used. 425 }, 426 ], 427 }</pre> 428</div> 429 430<div class="method"> 431 <code class="details" id="search_next">search_next(previous_request, previous_response)</code> 432 <pre>Retrieves the next page of results. 433 434Args: 435 previous_request: The request for the previous page. (required) 436 previous_response: The response from the request for the previous page. (required) 437 438Returns: 439 A request object that you can call 'execute()' on to request the next 440 page. Returns None if there are no more items in the collection. 441 </pre> 442</div> 443 444<div class="method"> 445 <code class="details" id="train">train(parent, body=None, x__xgafv=None)</code> 446 <pre>Trains the specified agent. 447 448Operation <response: google.protobuf.Empty> 449 450Args: 451 parent: string, Required. The project that the agent to train is associated with. 452Format: `projects/<Project ID>`. (required) 453 body: object, The request body. 454 The object takes the form of: 455 456{ # The request message for Agents.TrainAgent. 457 } 458 459 x__xgafv: string, V1 error format. 460 Allowed values 461 1 - v1 error format 462 2 - v2 error format 463 464Returns: 465 An object of the form: 466 467 { # This resource represents a long-running operation that is the result of a 468 # network API call. 469 "metadata": { # Service-specific metadata associated with the operation. It typically 470 # contains progress information and common metadata such as create time. 471 # Some services might not provide such metadata. Any method that returns a 472 # long-running operation should document the metadata type, if any. 473 "a_key": "", # Properties of the object. Contains field @type with type URL. 474 }, 475 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation. 476 # different programming environments, including REST APIs and RPC APIs. It is 477 # used by [gRPC](https://github.com/grpc). Each `Status` message contains 478 # three pieces of data: error code, error message, and error details. 479 # 480 # You can find out more about this error model and how to work with it in the 481 # [API Design Guide](https://cloud.google.com/apis/design/errors). 482 "message": "A String", # A developer-facing error message, which should be in English. Any 483 # user-facing error message should be localized and sent in the 484 # google.rpc.Status.details field, or localized by the client. 485 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 486 "details": [ # A list of messages that carry the error details. There is a common set of 487 # message types for APIs to use. 488 { 489 "a_key": "", # Properties of the object. Contains field @type with type URL. 490 }, 491 ], 492 }, 493 "done": True or False, # If the value is `false`, it means the operation is still in progress. 494 # If `true`, the operation is completed, and either `error` or `response` is 495 # available. 496 "response": { # The normal response of the operation in case of success. If the original 497 # method returns no data on success, such as `Delete`, the response is 498 # `google.protobuf.Empty`. If the original method is standard 499 # `Get`/`Create`/`Update`, the response should be the resource. For other 500 # methods, the response should have the type `XxxResponse`, where `Xxx` 501 # is the original method name. For example, if the original method name 502 # is `TakeSnapshot()`, the inferred response type is 503 # `TakeSnapshotResponse`. 504 "a_key": "", # Properties of the object. Contains field @type with type URL. 505 }, 506 "name": "A String", # The server-assigned name, which is only unique within the same service that 507 # originally returns it. If you use the default HTTP mapping, the 508 # `name` should be a resource name ending with `operations/{unique_id}`. 509 }</pre> 510</div> 511 512</body></html>