Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(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

Merged
merged 5 commits into from Feb 14, 2020

Conversation

@busunkim96
Copy link
Contributor

@busunkim96 busunkim96 commented Jan 28, 2020

  • Add MediaContent, BrowseCarouselCard, ColumnPropertiesin v2

  • Add SpeechContext, SpeechWordInfoin 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

@googlebot googlebot added the cla: yes label Jan 28, 2020
@busunkim96 busunkim96 requested a review from nnegrey Jan 28, 2020
_descriptor.FieldDescriptor(
name="language_code",
full_name="google.cloud.dialogflow.v2beta1.KnowledgeBase.language_code",
index=2,
number=4,
type=9,
cpp_type=9,
label=1,
has_default_value=False,
default_value=_b("").decode("utf-8"),
message_type=None,
enum_type=None,
containing_type=None,
is_extension=False,
extension_scope=None,
serialized_options=None,
file=DESCRIPTOR,
),
Comment on lines +86 to +103

This comment has been minimized.

@nnegrey

nnegrey Jan 28, 2020
Contributor

@busunkim96,

To add to the confusion, this isn't the problematic language_code field, but if this has no default value, won't this also be a required field and since it is new that would be a breaking change or am I reading this wrong?

This comment has been minimized.

@busunkim96

busunkim96 Feb 6, 2020
Author Contributor

Are you allowed to pass an empty language_code to the API? If that's true it might be alright that there's no default value here.

@busunkim96 busunkim96 changed the title feat: regenerate dialogflow feat(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 Feb 7, 2020
@busunkim96 busunkim96 changed the title feat(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 feat(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 Feb 7, 2020
@busunkim96
Copy link
Contributor Author

@busunkim96 busunkim96 commented Feb 7, 2020

@nnegrey Could you take another look? The next synth PR will make language_code optional.

@nnegrey
Copy link
Contributor

@nnegrey nnegrey commented Feb 10, 2020

Looking today

recognizer vocabulary \* ... See the `Cloud Speech
documentation <https://cloud.google.com/speech-to-
text/quotas>`__ for usage limits.
boost:

This comment has been minimized.

@nnegrey

nnegrey Feb 10, 2020
Contributor

I need to check, but Speech v1 removed boost from the beta and I think Dialogflow relies on that.

@nnegrey
Copy link
Contributor

@nnegrey nnegrey commented Feb 10, 2020

@busunkim96, if looking at this PR: #176

The change in that commit doesn't have the language_code as option for update_intent or batch_update_intent, but all the other methods do.

Copy link
Contributor Author

@busunkim96 busunkim96 left a comment

Regenerated the library one more time.

intent_batch_uri=intent_batch_uri,
intent_batch_inline=intent_batch_inline,
language_code=language_code,

This comment has been minimized.

@busunkim96

busunkim96 Feb 10, 2020
Author Contributor

language_code is now optional as expected

This comment has been minimized.

@nnegrey

nnegrey Feb 11, 2020
Contributor

WOO!

@busunkim96
Copy link
Contributor Author

@busunkim96 busunkim96 commented Feb 10, 2020

Docs build is failing

  File "/tmpfs/src/github/dialogflow-python-client-v2/.nox/docs/lib/python3.7/site-packages/sphinx/util/logging.py", line 404, in filter
    raise SphinxWarning(location + ":" + message)
sphinx.errors.SphinxWarning: docstring of dialogflow_v2.types.DetectIntentRequest:1:Unexpected section title or transition.

============================================================================

Warning, treated as error:
docstring of dialogflow_v2.types.DetectIntentRequest:1:Unexpected section title or transition.

@nnegrey
Copy link
Contributor

@nnegrey nnegrey commented Feb 11, 2020

@busunkim96, is that the reference docs that are failing?

@busunkim96
Copy link
Contributor Author

@busunkim96 busunkim96 commented Feb 11, 2020

@nnegrey Yep the reference docs. I'll tinker with it a bit today, but otherwise the generated changes look good.

@nnegrey
Copy link
Contributor

@nnegrey nnegrey commented Feb 11, 2020

What's involved in the tinkering (in case I ever should do it)?

@busunkim96
Copy link
Contributor Author

@busunkim96 busunkim96 commented Feb 14, 2020

Mostly trial and error. 😄

When the docs build fails it emits a warning or error. At that point I edit the problematic docstring in the _pb2 and re-run nox -s docs until it passes. To make the replacement permanent you then add a synth.replace to the synth.py.

Traceback (most recent call last):
  File "/tmpfs/src/github/dialogflow-python-client-v2/.nox/docs/lib/python3.7/site-packages/sphinx/cmd/build.py", line 276, in build_main
    app.build(args.force_all, filenames)
  File "/tmpfs/src/github/dialogflow-python-client-v2/.nox/docs/lib/python3.7/site-packages/sphinx/application.py", line 349, in build
    self.builder.build_update()
  File "/tmpfs/src/github/dialogflow-python-client-v2/.nox/docs/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 299, in build_update
    len(to_build))
  File "/tmpfs/src/github/dialogflow-python-client-v2/.nox/docs/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 311, in build
    updated_docnames = set(self.read())
  File "/usr/local/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/tmpfs/src/github/dialogflow-python-client-v2/.nox/docs/lib/python3.7/site-packages/sphinx/util/logging.py", line 219, in pending_warnings
    memhandler.flushTo(logger)
  File "/tmpfs/src/github/dialogflow-python-client-v2/.nox/docs/lib/python3.7/site-packages/sphinx/util/logging.py", line 184, in flushTo
    logger.handle(record)
  File "/usr/local/lib/python3.7/logging/__init__.py", line 1524, in handle
    self.callHandlers(record)
  File "/usr/local/lib/python3.7/logging/__init__.py", line 1586, in callHandlers
    hdlr.handle(record)
  File "/usr/local/lib/python3.7/logging/__init__.py", line 890, in handle
    rv = self.filter(record)
  File "/usr/local/lib/python3.7/logging/__init__.py", line 751, in filter
    result = f.filter(record)
  File "/tmpfs/src/github/dialogflow-python-client-v2/.nox/docs/lib/python3.7/site-packages/sphinx/util/logging.py", line 404, in filter
    raise SphinxWarning(location + ":" + message)
sphinx.errors.SphinxWarning: docstring of dialogflow_v2.types.DetectIntentRequest:1:Unexpected section title or transition.

============================================================================

Warning, treated as error:
docstring of dialogflow_v2.types.DetectIntentRequest:1:Unexpected section title or transition.

============================================================================

in session_pb2.py

s.replace("dialogflow_v2*/proto/session_pb2.py", "============================================================================", "")

I think this PR is good now (hopefully CI passes 🤞 ). Would you mind approving this PR?

@busunkim96 busunkim96 merged commit 713846b into master Feb 14, 2020
2 of 3 checks passed
2 of 3 checks passed
conventionalcommits.org Commit message did not follow Conventional Commits
Details
Kokoro Build successful
Details
cla/google All necessary CLAs are signed
@busunkim96 busunkim96 deleted the regen branch Feb 14, 2020
gcf-merge-on-green bot pushed a commit that referenced this pull request Mar 26, 2020
🤖 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.