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

feat(dialogflow): 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 #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 This human has signed the Contributor License Agreement. label Jan 28, 2020
Comment on lines +86 to +103
_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,
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

@nnegrey
Copy link
Contributor

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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@nnegrey
Copy link
Contributor

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.

https://github.com/googleapis/dialogflow-python-client-v2/blob/3071dd02d7d40d3488db96719f6ffe3a7975c8d9/dialogflow_v2/gapic/intents_client.py#L544

Copy link
Contributor Author

@busunkim96 busunkim96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regenerated the library one more time.

intent_batch_uri=intent_batch_uri,
intent_batch_inline=intent_batch_inline,
language_code=language_code,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

language_code is now optional as expected

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WOO!

@busunkim96
Copy link
Contributor Author

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 commented Feb 11, 2020

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

@busunkim96
Copy link
Contributor Author

@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 commented Feb 11, 2020

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

@busunkim96
Copy link
Contributor Author

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
@busunkim96 busunkim96 deleted the regen branch February 14, 2020 19:27
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants