Skip to content
This repository was archived by the owner on Dec 17, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/python-dialogflow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.7.2
Choose a base ref
...
head repository: googleapis/python-dialogflow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.8.0
Choose a head ref
  • 3 commits
  • 81 files changed
  • 3 contributors

Commits on Feb 14, 2020

  1. feat(dialogflow): add MediaContent, BrowseCarouselCard, `ColumnPr…

    …operties`in v2; add `SpeechContext`, `SpeechWordInfo`in v2; add `enable_word_info`, `speech_contexts`,`model` to InputAudioConfig in v2; add `subtitles` to `Intent.Message.ListSelect` in `v2beta1`; add `language_code` to `ListKnowledgeBase` in v2beta1; add `webhook_headers` to `QueryParameters` in v2beta1 (#175)
    busunkim96 authored Feb 14, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    713846b View commit details

Commits on Mar 26, 2020

  1. feat: add validation support to v2; add output_audio_config_mask to…

    … `detect_intent` method in v2beta1 and v2; add sub agent to v2beta1 (via synth) (#179)
    
    This PR was generated using Autosynth. 🌈
    
    Synth log will be available here:
    https://source.cloud.google.com/results/invocations/fa96c3f5-6491-43e0-b831-7e7e62b78e08/targets
    yoshi-automation authored Mar 26, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5a6f18e View commit details
  2. chore: release 0.8.0 (#178)

    🤖 I have created a release \*beep\* \*boop\* 
    ---
    ## [0.8.0](https://www.github.com/googleapis/dialogflow-python-client-v2/compare/v0.7.2...v0.8.0) (2020-03-26)
    
    
    ### Features
    
    * **dialogflow:** add `MediaContent`,  `BrowseCarouselCard`, `ColumnProperties`in v2; add `SpeechContext`, `SpeechWordInfo`in v2; add `enable_word_info`, `speech_contexts`,`model` to InputAudioConfig in v2; add `subtitles` to `Intent.Message.ListSelect` in `v2beta1`; add `language_code` to `ListKnowledgeBase` in v2beta1; add `webhook_headers` to `QueryParameters` in v2beta1 ([#175](https://www.github.com/googleapis/dialogflow-python-client-v2/issues/175)) ([713846b](https://www.github.com/googleapis/dialogflow-python-client-v2/commit/713846b7ed99eaf78cdf383aa9d39b43731b9a0d))
    * add validation support to v2; add `output_audio_config_mask` to `detect_intent` method in v2beta1 and v2; add sub agent to v2beta1 (via synth) ([#179](https://www.github.com/googleapis/dialogflow-python-client-v2/issues/179)) ([5a6f18e](https://www.github.com/googleapis/dialogflow-python-client-v2/commit/5a6f18e362b5dd87affbe75e0d0bfc0c21ab87a9))
    ---
    
    
    This PR was generated with [Release Please](https://github.com/googleapis/release-please).
    release-please[bot] authored Mar 26, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c5eb9c5 View commit details
Showing with 3,889 additions and 1,224 deletions.
  1. +8 −0 CHANGELOG.md
  2. +0 −219 CONTRIBUTING.rst
  3. +12 −1 dialogflow_v2/__init__.py
  4. +79 −1 dialogflow_v2/gapic/agents_client.py
  5. +5 −0 dialogflow_v2/gapic/agents_client_config.py
  6. +29 −6 dialogflow_v2/gapic/contexts_client.py
  7. +5 −4 dialogflow_v2/gapic/entity_types_client.py
  8. +106 −9 dialogflow_v2/gapic/enums.py
  9. +13 −18 dialogflow_v2/gapic/intents_client.py
  10. +25 −7 dialogflow_v2/gapic/session_entity_types_client.py
  11. +26 −12 dialogflow_v2/gapic/sessions_client.py
  12. +15 −1 dialogflow_v2/gapic/transports/agents_grpc_transport.py
  13. +1 −1 dialogflow_v2/gapic/transports/contexts_grpc_transport.py
  14. +1 −1 dialogflow_v2/gapic/transports/entity_types_grpc_transport.py
  15. +1 −1 dialogflow_v2/gapic/transports/intents_grpc_transport.py
  16. +1 −1 dialogflow_v2/gapic/transports/session_entity_types_grpc_transport.py
  17. +1 −1 dialogflow_v2/gapic/transports/sessions_grpc_transport.py
  18. +140 −32 dialogflow_v2/proto/agent_pb2.py
  19. +21 −0 dialogflow_v2/proto/agent_pb2_grpc.py
  20. +371 −50 dialogflow_v2/proto/audio_config_pb2.py
  21. +62 −27 dialogflow_v2/proto/context_pb2.py
  22. +11 −10 dialogflow_v2/proto/entity_type_pb2.py
  23. +6 −4 dialogflow_v2/proto/entity_type_pb2_grpc.py
  24. +1,379 −140 dialogflow_v2/proto/intent_pb2.py
  25. +57 −37 dialogflow_v2/proto/session_entity_type_pb2.py
  26. +271 −151 dialogflow_v2/proto/session_pb2.py
  27. +240 −0 dialogflow_v2/proto/validation_result_pb2.py
  28. +2 −0 dialogflow_v2/proto/validation_result_pb2_grpc.py
  29. +15 −2 dialogflow_v2/proto/webhook_pb2.py
  30. +5 −1 dialogflow_v2/types.py
  31. +12 −1 dialogflow_v2beta1/__init__.py
  32. +1 −1 dialogflow_v2beta1/gapic/agents_client.py
  33. +1 −1 dialogflow_v2beta1/gapic/contexts_client.py
  34. +1 −1 dialogflow_v2beta1/gapic/documents_client.py
  35. +4 −4 dialogflow_v2beta1/gapic/entity_types_client.py
  36. +9 −9 dialogflow_v2beta1/gapic/enums.py
  37. +12 −18 dialogflow_v2beta1/gapic/intents_client.py
  38. +1 −1 dialogflow_v2beta1/gapic/knowledge_bases_client.py
  39. +1 −1 dialogflow_v2beta1/gapic/session_entity_types_client.py
  40. +17 −8 dialogflow_v2beta1/gapic/sessions_client.py
  41. +1 −1 dialogflow_v2beta1/gapic/transports/agents_grpc_transport.py
  42. +1 −1 dialogflow_v2beta1/gapic/transports/contexts_grpc_transport.py
  43. +1 −1 dialogflow_v2beta1/gapic/transports/documents_grpc_transport.py
  44. +1 −1 dialogflow_v2beta1/gapic/transports/entity_types_grpc_transport.py
  45. +1 −1 dialogflow_v2beta1/gapic/transports/intents_grpc_transport.py
  46. +1 −1 dialogflow_v2beta1/gapic/transports/knowledge_bases_grpc_transport.py
  47. +1 −1 dialogflow_v2beta1/gapic/transports/session_entity_types_grpc_transport.py
  48. +1 −1 dialogflow_v2beta1/gapic/transports/sessions_grpc_transport.py
  49. +104 −21 dialogflow_v2beta1/proto/agent_pb2.py
  50. +56 −39 dialogflow_v2beta1/proto/audio_config_pb2.py
  51. +5 −1 dialogflow_v2beta1/proto/context_pb2.py
  52. +27 −25 dialogflow_v2beta1/proto/document_pb2.py
  53. +6 −5 dialogflow_v2beta1/proto/entity_type_pb2.py
  54. +4 −4 dialogflow_v2beta1/proto/entity_type_pb2_grpc.py
  55. +176 −145 dialogflow_v2beta1/proto/intent_pb2.py
  56. +41 −17 dialogflow_v2beta1/proto/knowledge_base_pb2.py
  57. +4 −4 dialogflow_v2beta1/proto/session_entity_type_pb2.py
  58. +313 −117 dialogflow_v2beta1/proto/session_pb2.py
  59. +15 −2 dialogflow_v2beta1/proto/webhook_pb2.py
  60. +1 −1 dialogflow_v2beta1/types.py
  61. +4 −0 docs/_static/custom.css
  62. +50 −0 docs/_templates/layout.html
  63. +3 −2 noxfile.py
  64. +1 −0 setup.cfg
  65. +1 −1 setup.py
  66. +12 −5 synth.metadata
  67. +15 −0 synth.py
  68. +33 −1 tests/unit/gapic/v2/test_agents_client_v2.py
  69. +1 −1 tests/unit/gapic/v2/test_contexts_client_v2.py
  70. +1 −1 tests/unit/gapic/v2/test_entity_types_client_v2.py
  71. +7 −15 tests/unit/gapic/v2/test_intents_client_v2.py
  72. +1 −1 tests/unit/gapic/v2/test_session_entity_types_client_v2.py
  73. +1 −1 tests/unit/gapic/v2/test_sessions_client_v2.py
  74. +1 −1 tests/unit/gapic/v2beta1/test_agents_client_v2beta1.py
  75. +1 −1 tests/unit/gapic/v2beta1/test_contexts_client_v2beta1.py
  76. +1 −1 tests/unit/gapic/v2beta1/test_documents_client_v2beta1.py
  77. +1 −1 tests/unit/gapic/v2beta1/test_entity_types_client_v2beta1.py
  78. +7 −15 tests/unit/gapic/v2beta1/test_intents_client_v2beta1.py
  79. +19 −4 tests/unit/gapic/v2beta1/test_knowledge_bases_client_v2beta1.py
  80. +1 −1 tests/unit/gapic/v2beta1/test_session_entity_types_client_v2beta1.py
  81. +1 −1 tests/unit/gapic/v2beta1/test_sessions_client_v2beta1.py
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,14 @@

[1]: https://pypi.org/project/dialogflow/#history

## [0.8.0](https://www.github.com/googleapis/dialogflow-python-client-v2/compare/v0.7.2...v0.8.0) (2020-03-26)


### Features

* **dialogflow:** add `MediaContent`, `BrowseCarouselCard`, `ColumnProperties`in v2; add `SpeechContext`, `SpeechWordInfo`in v2; add `enable_word_info`, `speech_contexts`,`model` to InputAudioConfig in v2; add `subtitles` to `Intent.Message.ListSelect` in `v2beta1`; add `language_code` to `ListKnowledgeBase` in v2beta1; add `webhook_headers` to `QueryParameters` in v2beta1 ([#175](https://www.github.com/googleapis/dialogflow-python-client-v2/issues/175)) ([713846b](https://www.github.com/googleapis/dialogflow-python-client-v2/commit/713846b7ed99eaf78cdf383aa9d39b43731b9a0d))
* add validation support to v2; add `output_audio_config_mask` to `detect_intent` method in v2beta1 and v2; add sub agent to v2beta1 (via synth) ([#179](https://www.github.com/googleapis/dialogflow-python-client-v2/issues/179)) ([5a6f18e](https://www.github.com/googleapis/dialogflow-python-client-v2/commit/5a6f18e362b5dd87affbe75e0d0bfc0c21ab87a9))

### [0.7.2](https://www.github.com/googleapis/dialogflow-python-client-v2/compare/v0.7.1...v0.7.2) (2019-10-18)


219 changes: 0 additions & 219 deletions CONTRIBUTING.rst

This file was deleted.

13 changes: 12 additions & 1 deletion dialogflow_v2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@


from __future__ import absolute_import
import sys
import warnings

from dialogflow_v2 import types
from dialogflow_v2.gapic import agents_client
@@ -27,6 +29,15 @@
from dialogflow_v2.gapic import sessions_client


if sys.version_info[:2] == (2, 7):
message = (
"A future version of this library will drop support for Python 2.7."
"More details about Python 2 support for Google Cloud Client Libraries"
"can be found at https://cloud.google.com/python/docs/python2-sunset/"
)
warnings.warn(message, DeprecationWarning)


class AgentsClient(agents_client.AgentsClient):
__doc__ = agents_client.AgentsClient.__doc__
enums = enums
80 changes: 79 additions & 1 deletion dialogflow_v2/gapic/agents_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -39,6 +39,7 @@
from dialogflow_v2.gapic.transports import agents_grpc_transport
from dialogflow_v2.proto import agent_pb2
from dialogflow_v2.proto import agent_pb2_grpc
from dialogflow_v2.proto import validation_result_pb2
from google.longrunning import operations_pb2
from google.protobuf import empty_pb2
from google.protobuf import field_mask_pb2
@@ -932,3 +933,80 @@ def restore_agent(
empty_pb2.Empty,
metadata_type=struct_pb2.Struct,
)

def get_validation_result(
self,
parent=None,
language_code=None,
retry=google.api_core.gapic_v1.method.DEFAULT,
timeout=google.api_core.gapic_v1.method.DEFAULT,
metadata=None,
):
"""
Gets agent validation result. Agent validation is performed during
training time and is updated automatically when training is completed.
Example:
>>> import dialogflow_v2
>>>
>>> client = dialogflow_v2.AgentsClient()
>>>
>>> response = client.get_validation_result()
Args:
parent (str): Required. The project that the agent is associated with. Format:
``projects/<Project ID>``.
language_code (str): Optional. The language for which you want a validation result. If not
specified, the agent's default language is used. `Many
languages <https://cloud.google.com/dialogflow/docs/reference/language>`__
are supported. Note: languages must be enabled in the agent before they
can be used.
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
timeout (Optional[float]): The amount of time, in seconds, to wait
for the request to complete. Note that if ``retry`` is
specified, the timeout applies to each individual attempt.
metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata
that is provided to the method.
Returns:
A :class:`~google.cloud.dialogflow_v2.types.ValidationResult` instance.
Raises:
google.api_core.exceptions.GoogleAPICallError: If the request
failed for any reason.
google.api_core.exceptions.RetryError: If the request failed due
to a retryable error and retry attempts failed.
ValueError: If the parameters are invalid.
"""
# Wrap the transport method to add retry and timeout logic.
if "get_validation_result" not in self._inner_api_calls:
self._inner_api_calls[
"get_validation_result"
] = google.api_core.gapic_v1.method.wrap_method(
self.transport.get_validation_result,
default_retry=self._method_configs["GetValidationResult"].retry,
default_timeout=self._method_configs["GetValidationResult"].timeout,
client_info=self._client_info,
)

request = agent_pb2.GetValidationResultRequest(
parent=parent, language_code=language_code
)
if metadata is None:
metadata = []
metadata = list(metadata)
try:
routing_header = [("parent", parent)]
except AttributeError:
pass
else:
routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata(
routing_header
)
metadata.append(routing_metadata)

return self._inner_api_calls["get_validation_result"](
request, retry=retry, timeout=timeout, metadata=metadata
)
5 changes: 5 additions & 0 deletions dialogflow_v2/gapic/agents_client_config.py
Original file line number Diff line number Diff line change
@@ -57,6 +57,11 @@
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"GetValidationResult": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
},
}
}
Loading