Skip to content

Commit

Permalink
chore(dialogflow-cx): migrate code from googleapis/python-dialogflow-…
Browse files Browse the repository at this point in the history
…cx (#9077)

* docs(samples): add initial sample codes (#13)

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-dialogflow-cx/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes #12  🦕

* fix: corrects the repo/homepage link (#15)

* fix: corrects the repo/homepage link

* chore: adds newline to end of file

* chore(deps): update dependency google-cloud-dialogflow-cx to v0.1.1 (#16)

* chore(deps): update dependency google-cloud-dialogflow-cx to v0.2.0 (#26)

* Sample code update for regionalization (#29)

* Modify sample code to support regional endpoints

* format codes

Co-authored-by: Yuexin Wu <yuexinwu@google.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v0.4.0 (#49)

* chore(deps): update dependency google-cloud-dialogflow-cx to v0.4.1 (#79)

* chore(deps): update dependency pytest to v6.2.4 (#82)

* chore(deps): update dependency google-cloud-dialogflow-cx to v0.5.0 (#97)

* chore(deps): update dependency google-cloud-dialogflow-cx to v0.6.0 (#101)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-cloud-dialogflow-cx](https://togithub.com/googleapis/python-dialogflow-cx) | `==0.5.0` -> `==0.6.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/0.6.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/0.6.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/0.6.0/compatibility-slim/0.5.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/0.6.0/confidence-slim/0.5.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/python-dialogflow-cx</summary>

### [`v0.6.0`](https://togithub.com/googleapis/python-dialogflow-cx/blob/master/CHANGELOG.md#&#8203;060-httpswwwgithubcomgoogleapispython-dialogflow-cxcomparev050v060-2021-06-07)

[Compare Source](https://togithub.com/googleapis/python-dialogflow-cx/compare/v0.5.0...v0.6.0)

##### Features

-   support sentiment analysis in bot testing ([#&#8203;98](https://www.github.com/googleapis/python-dialogflow-cx/issues/98)) ([db258bc](https://www.github.com/googleapis/python-dialogflow-cx/commit/db258bcc9971542e347b50f396bd51ec88520fde))

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-dialogflow-cx).

* chore(deps): update dependency google-cloud-dialogflow-cx to v0.7.1 (#109)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-cloud-dialogflow-cx](https://togithub.com/googleapis/python-dialogflow-cx) | `==0.6.0` -> `==0.7.1` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/0.7.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/0.7.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/0.7.1/compatibility-slim/0.6.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/0.7.1/confidence-slim/0.6.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/python-dialogflow-cx</summary>

### [`v0.7.1`](https://togithub.com/googleapis/python-dialogflow-cx/blob/master/CHANGELOG.md#&#8203;071-httpswwwgithubcomgoogleapispython-dialogflow-cxcomparev070v071-2021-06-16)

[Compare Source](https://togithub.com/googleapis/python-dialogflow-cx/compare/v0.7.0...v0.7.1)

### [`v0.7.0`](https://togithub.com/googleapis/python-dialogflow-cx/blob/master/CHANGELOG.md#&#8203;070-httpswwwgithubcomgoogleapispython-dialogflow-cxcomparev060v070-2021-06-16)

[Compare Source](https://togithub.com/googleapis/python-dialogflow-cx/compare/v0.6.0...v0.7.0)

##### Features

-   **v3beta1:** Support partial response feature ([5e21ed4](https://www.github.com/googleapis/python-dialogflow-cx/commit/5e21ed454ad6a5d687e634ad4e697f1921104c47))
-   **v3beta1:** support sentiment analysis in bot testing ([#&#8203;100](https://www.github.com/googleapis/python-dialogflow-cx/issues/100)) ([f24f302](https://www.github.com/googleapis/python-dialogflow-cx/commit/f24f3028fa83da14614d1340e5bce7719be287b6))

##### Bug Fixes

-   exclude docs and tests from package ([#&#8203;104](https://www.github.com/googleapis/python-dialogflow-cx/issues/104)) ([2ddb70b](https://www.github.com/googleapis/python-dialogflow-cx/commit/2ddb70b5825ad0d59165d7dfbfe36677d586cccf))
-   **v3beta1:** Set agent default language code as required ([#&#8203;103](https://www.github.com/googleapis/python-dialogflow-cx/issues/103)) ([5e21ed4](https://www.github.com/googleapis/python-dialogflow-cx/commit/5e21ed454ad6a5d687e634ad4e697f1921104c47))

##### Documentation

-   **v3beta1:** Update docs of Agents, Fulfillments, SecuritySettings and Sessions ([5e21ed4](https://www.github.com/googleapis/python-dialogflow-cx/commit/5e21ed454ad6a5d687e634ad4e697f1921104c47))

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-dialogflow-cx).

* chore(deps): update dependency google-cloud-dialogflow-cx to v0.8.0 (#121)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-cloud-dialogflow-cx](https://togithub.com/googleapis/python-dialogflow-cx) | `==0.7.1` -> `==0.8.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/0.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/0.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/0.8.0/compatibility-slim/0.7.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/0.8.0/confidence-slim/0.7.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/python-dialogflow-cx</summary>

### [`v0.8.0`](https://togithub.com/googleapis/python-dialogflow-cx/blob/master/CHANGELOG.md#&#8203;080-httpswwwgithubcomgoogleapispython-dialogflow-cxcomparev071v080-2021-06-30)

[Compare Source](https://togithub.com/googleapis/python-dialogflow-cx/compare/v0.7.1...v0.8.0)

##### Features

-   add always_use_jwt_access ([3550fa7](https://www.github.com/googleapis/python-dialogflow-cx/commit/3550fa7fa5863a313bd9288a1f515557f8f9fdea))
-   add return_partial response to Fulfillment ([3550fa7](https://www.github.com/googleapis/python-dialogflow-cx/commit/3550fa7fa5863a313bd9288a1f515557f8f9fdea))
-   mark agent.default_language_code as required ([3550fa7](https://www.github.com/googleapis/python-dialogflow-cx/commit/3550fa7fa5863a313bd9288a1f515557f8f9fdea))

##### Bug Fixes

-   disable always_use_jwt_access ([#&#8203;119](https://www.github.com/googleapis/python-dialogflow-cx/issues/119)) ([3550fa7](https://www.github.com/googleapis/python-dialogflow-cx/commit/3550fa7fa5863a313bd9288a1f515557f8f9fdea))

##### Documentation

-   add notes to train agent before sending queries ([3550fa7](https://www.github.com/googleapis/python-dialogflow-cx/commit/3550fa7fa5863a313bd9288a1f515557f8f9fdea))
-   added notes to train agent before sending queries ([#&#8203;111](https://www.github.com/googleapis/python-dialogflow-cx/issues/111)) ([8a53800](https://www.github.com/googleapis/python-dialogflow-cx/commit/8a5380055dfa7d58f83be5ce0da310318b54fc51))
-   omit mention of Python 2.7 in 'CONTRIBUTING.rst' ([#&#8203;1127](https://www.github.com/googleapis/python-dialogflow-cx/issues/1127)) ([#&#8203;110](https://www.github.com/googleapis/python-dialogflow-cx/issues/110)) ([40974f5](https://www.github.com/googleapis/python-dialogflow-cx/commit/40974f56c27833ab23575426f75d0868e1a10d94)), closes [#&#8203;1126](https://www.github.com/googleapis/python-dialogflow-cx/issues/1126)

##### [0.7.1](https://www.github.com/googleapis/python-dialogflow-cx/compare/v0.7.0...v0.7.1) (2021-06-16)

##### Bug Fixes

-   **deps:** add packaging requirement ([#&#8203;105](https://www.github.com/googleapis/python-dialogflow-cx/issues/105)) ([5d47692](https://www.github.com/googleapis/python-dialogflow-cx/commit/5d476920c8c6825050a828896231542f6bfde2e2))

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-dialogflow-cx).

* chore(deps): update dependency google-cloud-dialogflow-cx to v1 (#123)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-cloud-dialogflow-cx](https://togithub.com/googleapis/python-dialogflow-cx) | `==0.8.0` -> `==1.0.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.0.0/compatibility-slim/0.8.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.0.0/confidence-slim/0.8.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/python-dialogflow-cx</summary>

### [`v1.0.0`](https://togithub.com/googleapis/python-dialogflow-cx/blob/master/CHANGELOG.md#&#8203;100-httpswwwgithubcomgoogleapispython-dialogflow-cxcomparev080v100-2021-06-30)

[Compare Source](https://togithub.com/googleapis/python-dialogflow-cx/compare/v0.8.0...v1.0.0)

##### Features

-   bump release level to production/stable ([#&#8203;88](https://www.github.com/googleapis/python-dialogflow-cx/issues/88)) ([47739f9](https://www.github.com/googleapis/python-dialogflow-cx/commit/47739f927032ca8701297260f0374f11b2c756b9))

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-dialogflow-cx).

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.1.0 (#132)

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.1.1 (#136)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-cloud-dialogflow-cx](https://togithub.com/googleapis/python-dialogflow-cx) | `==1.1.0` -> `==1.1.1` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.1.1/compatibility-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.1.1/confidence-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/python-dialogflow-cx</summary>

### [`v1.1.1`](https://togithub.com/googleapis/python-dialogflow-cx/blob/master/CHANGELOG.md#&#8203;111-httpswwwgithubcomgoogleapispython-dialogflow-cxcomparev110v111-2021-07-24)

[Compare Source](https://togithub.com/googleapis/python-dialogflow-cx/compare/v1.1.0...v1.1.1)

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-dialogflow-cx).

* docs(samples): add agent creation code snippet (#146)

* add agent creation code snippet

* update test

* Updated test

* moved delete agent

* lint fix

* lint fix

* Fixed Copyright

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.2.0 (#140)

* docs(samples): add update intent sample (#142)

* add update intent sample

* fixed lint

* added agent creation

* fixed lint

* added randomized agent name

* Failing test fix

* Fixed failing test

* Change intent request

* removed self from test

* lint fix

* Update samples/snippets/update_intent_test.py

Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>

Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>

* chore: generate python samples templates in owlbot.py (#149)

Generate python samples templates in owlbot.py

* docs(samples): add region tags (#150)

* docs(samples): add region tags (#151)

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-dialogflow-cx/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.3.0 (#160)

* chore(deps): update dependency pytest to v6.2.5 (#158)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.3.1 (#163)

* docs(samples): added page management samples (#152)

* docs(samples): added page management samples

* fixed failing test

* Remvoe await

* added await

* added pytest async

* Lint fix

* Lint and test case fix

* removed pytest.async

* test fix

* update tests

* fix uuid

* added asyncio

* added loop

* removed async

* test fix

* changed pytest scope to session

* changes fixture scope

* test change

* test fix

* changed response type

* fixed list page test

* lint fix

* failing test fix

* revised code per comments

* converted object to string

Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore: blacken samples noxfile template (#170)

* docs(samples): added filter sample (#171)

* docs(samples): added filter sample

* lint fix

* removed pytest variables

* update test id

* Update samples/snippets/list_testcase_results_test.py

Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>

* Revised Code

* fixed failing test

* lint fix

* lint fix

* lint fix

* Update samples/snippets/list_testcase_results.py

Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>

Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.3.2 (#175)

* chore: fail samples nox session if python version is missing (#180)

* chore(python): Add kokoro configs for python 3.10 samples testing (#188)

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.4.0 (#185)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.5.0 (#190)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-cloud-dialogflow-cx](https://togithub.com/googleapis/python-dialogflow-cx) | `==1.4.0` -> `==1.5.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.5.0/compatibility-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.5.0/confidence-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/python-dialogflow-cx</summary>

### [`v1.5.0`](https://togithub.com/googleapis/python-dialogflow-cx/blob/master/CHANGELOG.md#&#8203;150-httpswwwgithubcomgoogleapispython-dialogflow-cxcomparev140v150-2021-10-11)

[Compare Source](https://togithub.com/googleapis/python-dialogflow-cx/compare/v1.4.0...v1.5.0)

##### Features

-   add context manager support in client ([#&#8203;187](https://www.togithub.com/googleapis/python-dialogflow-cx/issues/187)) ([70d4776](https://www.github.com/googleapis/python-dialogflow-cx/commit/70d4776d80f1f60b3f45e08e8dc64a47e2fae3e6))

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-dialogflow-cx).

* docs(samples): add voice selection (#184)

* docs(samples): add voice selection

* lint fix

* Update samples/snippets/detect_intent_stream.py

Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>

* Update samples/snippets/detect_intent_stream.py

Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>

Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>

* docs(samples): added webhook sample (#169)

* docs(samples): added webhook sample

* fixed webhoot test

* failling test fix

* used json

* added flask to requirment.txt

* Changed request handling

* update test

* fixed failing test

* convert response to string

* lint

* made test clearer

* Added Flask and changed get_json

* Removed flask import

* added request

* Changed code

* changed test

* changed test

* changed test

* Changed test

* test fix

* test fix

* lint fix

* Revised Code

* Lint fix

* fixed requirments.txt

* Revised Code

* lint fix

* lint fix

* lint fix

* revised code

* lint fix

* docs(samples): adds list training phrases sample (#196)

* chore(deps): update dependency flask to v2.0.2 (#194)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* docs(samples): added comment to webhook sample (#211)

* docs(samples): added comment to webhook sample

* Update samples/snippets/webhook.py

Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>

* comments fix

Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.6.0 (#205)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.7.0 (#213)

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-cloud-dialogflow-cx](https://togithub.com/googleapis/python-dialogflow-cx) | `==1.6.0` -> `==1.7.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.7.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.7.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.7.0/compatibility-slim/1.6.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-dialogflow-cx/1.7.0/confidence-slim/1.6.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/python-dialogflow-cx</summary>

### [`v1.7.0`](https://togithub.com/googleapis/python-dialogflow-cx/blob/master/CHANGELOG.md#&#8203;170-httpswwwgithubcomgoogleapispython-dialogflow-cxcomparev160v170-2021-11-12)

[Compare Source](https://togithub.com/googleapis/python-dialogflow-cx/compare/v1.6.0...v1.7.0)

##### Features

-   allow setting custom CA for generic webhooks ([#&#8203;207](https://www.togithub.com/googleapis/python-dialogflow-cx/issues/207)) ([441d66b](https://www.github.com/googleapis/python-dialogflow-cx/commit/441d66b3864c34cf37570b6c58ccf097eb20e919))

##### Documentation

-   **samples:** added comment to webhook sample ([#&#8203;211](https://www.togithub.com/googleapis/python-dialogflow-cx/issues/211)) ([4d36e31](https://www.github.com/googleapis/python-dialogflow-cx/commit/4d36e31f20e38755dd5d4a7a92bb8c48722cb11e))

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-dialogflow-cx).

* docs(samples): Added LRO code snippet (#220)

* docs(samples): Added LRO code snippet

* lint fix

* converted export_agent response to string in test

* Update samples/snippets/long_running_operation.py

Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com>

* changed name of function

Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com>

* chore(samples): Add check for tests in directory (#227)

Source-Link: googleapis/synthtool@52aef91
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:36a95b8f494e4674dc9eee9af98961293b51b86b3649942aac800ae6c1f796d4

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* chore(python): Noxfile recognizes that tests can live in a folder (#234)

Source-Link: googleapis/synthtool@4760d8d
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f0e4b51deef56bed74d3e2359c583fc104a8d6367da3984fc5c66938db738828

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.8.0 (#233)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update dependency pytest to v7 (#246)

* chore: use gapic-generator-python 0.63.1 (#245)

- [x] Regenerate this pull request now.

docs: add autogenerated code snippets
PiperOrigin-RevId: 426256923

Source-Link: googleapis/googleapis@9ebabfa

Source-Link: https://github.com/googleapis/googleapis-gen/commit/a88175263e60a1d45d3a447848652b0f670b2cb8
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTg4MTc1MjYzZTYwYTFkNDVkM2E0NDc4NDg2NTJiMGY2NzBiMmNiOCJ9

Fixes #229

* chore(deps): update all dependencies (#251)

* chore(deps): update all dependencies (#256)

* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* chore: Adding support for pytest-xdist and pytest-parallel (#264)

Source-Link: googleapis/synthtool@82f5cb2
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5d8da01438ece4021d135433f2cf3227aa39ef0eaccc941d62aa35e6902832ae

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.9.1 (#267)

* chore(deps): update all dependencies (#271)

* chore(deps): update dependency pytest to v7.1.1 (#272)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(python): use black==22.3.0 (#282)

Source-Link: googleapis/synthtool@6fab84a
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe

* chore(deps): update dependency flask to v2.1.0 (#280)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update dependency flask to v2.1.1 (#284)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(python): add nox session to sort python imports (#295)

Source-Link: googleapis/synthtool@1b71c10
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* chore(deps): update dependency pytest to v7.1.2 (#299)

* chore(deps): update dependency flask to v2.1.2 (#301)

* docs(samples): Adds snippet for validating a form parameter. (#302)

* docs(samples): Configure session parameters snippet (#303)

* chore: update copyright year

* chore: Cleans up stray # in docstring.

* docs(samples): Adds snippet for configuring new session parameters.

* Update module docstring for the validate form parameter snippet.

* docs(samples): Configure session parameters trigger transition (#304)

* chore: Typo fixes

* docs(samples): Adds snippet for configuring new session parameters trigger transition.

* docs(samples): Adds snippet for configuring optional or required form parameters (#305)

* docs(samples): Adds snippet for configuring a webhook to enable an agent response. (#306)

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.11.0 (#308)

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.12.0 (#315)

* chore: Update dialogflow_cx_webhook snippet to match NodeJS (#409)

* chore: Update dialogflow_cx_webhook snippet to match NodeJS

* Updates noxfile to skip deps install, if empty; otherwise an exception occurs

* chore: Dialogflow cx v3 webhook validate form parameter (#410)

* chore: update region tag for webhook validate form parameter snippet

* update snippet and test for consistency with NodeJS implementation

* linting

* chore: update dialogflow_cx_v3_webhook_configure_session_parameters snippet (#411)

* chore: Remove refactored webhook snippets (#412)

* docs: add streaming detect intent with partial response sample (#414)

* docs: add streaming detect intent with partial response sample

* linting

* docs: add detect intent with sentiment analysis snippet (#416)

* docs: add detect intent with intent input snippet (#417)

WIP

* docs: add detect intent with text-to-speech synthesized output snippet (#419)

chore: Update test-samples-impl.sh python3.6 --> python3.9 (#418)

Source-Link: googleapis/synthtool@1f07110
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:a5d81b61dfd1a432d3c03f51a25d2e71b37be24da509966d50724aea7c57c5c2

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: nicain <nicholascain@google.com>

fix test

* docs: Dialogflow cx v3 detect intent event input snippet (#421)

* docs: add detect event with event input snippet

* Update detect_intent_event_test.py

* fix: Update detect_intent_synthesize_tts_response.py (#423)

* fix: Update detect_intent_synthesize_tts_response.py

* Update detect_intent_synthesize_tts_response.py

* docs: Add dialogflow cx detect intent with disabled webhook snippet (#422)

* docs: Add dialogflow cx detect intent with disabled webhook snippet

* Update detect_intent_disabled_webhook_test.py

* chore(python): drop python 3.6 (#420)

Source-Link: googleapis/synthtool@4f89b13
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: nicain <nicholascain@google.com>

* docs: Update region_tag: dialogflow_detect_intent_text --> dialogflow_cx_detect_intent_text (#424)

* chore(deps): update all dependencies (#429)

* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* revert

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update all dependencies (#430)

* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* revert

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update all dependencies (#431)

* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* revert

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update all dependencies (#432)

* chore(deps): update all dependencies

* revert

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.13.1 (#438)

* docs(samples): Add prebuilt telecom agent webhook code in python (#434)

* feat: add prebuilt telecom webhook python sample code and test

* feat:add test

* fix:lint errors

* fix:add new line at the end of file

* fix: add more comprehensive tests

* fix: pylint

* feat:change helper function and address comments

* fix: pylint

Co-authored-by: nicain <nicholascain@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update dependency pytest to v7.1.3 (#450)

* chore: detect samples tests in nested directories (#456)

Source-Link: googleapis/synthtool@50db768
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e09366bdf0fd9c8976592988390b24d53583dd9f002d476934da43725adbb978

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* feat: Adding snippet to extract SessionInfo (#457)

This snippet provides an example of how to extract SessionInfo from
WebhookRequests.

Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.13.4 (#464)

* chore(deps): update dependency pytest to v7.2.0 (#467)

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.13.5 (#468)

* chore(python): drop flake8-import-order in samples noxfile (#473)

Source-Link: googleapis/synthtool@6ed3a83
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:3abfa0f1886adaf0b83f07cb117b24a639ea1cb9cffe56d43280b977033563eb

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#469)

* chore: update to gapic-generator-python 1.5.0

feat: add support for `google.cloud.<api>.__version__`
PiperOrigin-RevId: 484665853

Source-Link: googleapis/googleapis@8eb249a

Source-Link: https://github.com/googleapis/googleapis-gen/commit/c8aa327b5f478865fc3fd91e3c2768e54e26ad44
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: Clarify interactive logging TTL behavior

PiperOrigin-RevId: 485069403

Source-Link: googleapis/googleapis@63cd62a

Source-Link: https://github.com/googleapis/googleapis-gen/commit/d4f928e8aa29d03051428f8661827a534de6e1f6
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDRmOTI4ZThhYTI5ZDAzMDUxNDI4Zjg2NjE4MjdhNTM0ZGU2ZTFmNiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* update version in gapic_version.py

* add .release-please-manifest.json with correct version

* set manifest to true in .github/release-please.yml

* add release-please-config.json

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: new APIs added to reflect updates to the filestore service

- Add ENTERPRISE Tier
- Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot
- Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare
- Add ConnectMode to NetworkConfig (for Private Service Access support)
- New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING)
- Add SuspensionReason (for KMS related suspension)
- Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled

PiperOrigin-RevId: 487492758

Source-Link: googleapis/googleapis@5be5981

Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab0e217f560cc2c1afc11441c2eab6b6950efd2b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* update path to snippet metadata json

* feat: Add files field to finding's list of attributes

PiperOrigin-RevId: 488290111

Source-Link: googleapis/googleapis@7349e1c

Source-Link: https://github.com/googleapis/googleapis-gen/commit/721049d512deebaa96d438aa23e970299d97712b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzIxMDQ5ZDUxMmRlZWJhYTk2ZDQzOGFhMjNlOTcwMjk5ZDk3NzEyYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: Clarified Agent Assist max retention is 30 days

PiperOrigin-RevId: 489241089

Source-Link: googleapis/googleapis@e795029

Source-Link: https://github.com/googleapis/googleapis-gen/commit/4380bee60092cd1aaf2be81b6c08bb76f8c12a66
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDM4MGJlZTYwMDkyY2QxYWFmMmJlODFiNmMwOGJiNzZmOGMxMmE2NiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: Clarified Agent Assist max retention is 30 days

PiperOrigin-RevId: 489494670

Source-Link: googleapis/googleapis@e35c0d3

Source-Link: https://github.com/googleapis/googleapis-gen/commit/4c3848551a76fdf190533292127211a4ad8fee8b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGMzODQ4NTUxYTc2ZmRmMTkwNTMzMjkyMTI3MjExYTRhZDhmZWU4YiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: use templated setup.py and owlbot.py

* chore(python): fix warehouse-package-name for dialogflow/cx v3 and v3beta1

PiperOrigin-RevId: 492185983

Source-Link: googleapis/googleapis@ac614c7

Source-Link: https://github.com/googleapis/googleapis-gen/commit/ce0d078339e501a500a28fdc4836a8dcccbb7e3b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2UwZDA3ODMzOWU1MDFhNTAwYTI4ZmRjNDgzNmE4ZGNjY2JiN2UzYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix(deps): Require google-api-core >=1.34.0, >=2.11.0

fix: Drop usage of pkg_resources

fix: Fix timeout default values

docs(samples): Snippetgen should call await on the operation coroutine before calling result

PiperOrigin-RevId: 493260409

Source-Link: googleapis/googleapis@fea4387

Source-Link: https://github.com/googleapis/googleapis-gen/commit/387b7344c7529ee44be84e613b19a820508c612b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzg3YjczNDRjNzUyOWVlNDRiZTg0ZTYxM2IxOWE4MjA1MDhjNjEyYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* add gapic_version.py

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.14.0 (#476)

* docs(samples): Update previous month logic to avoid zero-index bug in webhook_prebuilt_telecom sample (#479)

* fix: Update previous month logic to avoid zer-index bug

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>

* chore(python): add support for python 3.11 (#477)

Source-Link: googleapis/synthtool@7197a00
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.14.1 (#481)

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.15.0 (#484)

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.16.0 (#487)

* chore(deps): update dependency pytest to v7.2.1 (#490)

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.17.0 (#491)

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.17.1 (#494)

Co-authored-by: Anthonios Partheniou <partheniou@google.com>

* chore(deps): update dependency google-cloud-dialogflow-cx to v1.18.0 (#499)

* Rename folder

* Update CODEOWNERS

* Update headers

* remove dialogflow/noxfile.py

* Update .github/CODEOWNERS

---------

Co-authored-by: wuyuexin <wuyuexin@gmail.com>
Co-authored-by: Dan O'Meara <danom@google.com>
Co-authored-by: WhiteSource Renovate <renovate@whitesourcesoftware.com>
Co-authored-by: WhiteSource Renovate <bot@renovateapp.com>
Co-authored-by: Yuexin Wu <yuexinwu@google.com>
Co-authored-by: Gal Zahavi <38544478+galz10@users.noreply.github.com>
Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>
Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Franklin Nunez <69214580+b-loved-dreamer@users.noreply.github.com>
Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: nicain <nicholascain@google.com>
Co-authored-by: Yvonne Li <liyvonne@google.com>
Co-authored-by: hjosiah <104866418+hjosiah@users.noreply.github.com>
Co-authored-by: Holt Skinner <13262395+holtskinner@users.noreply.github.com>
  • Loading branch information
18 people authored and Eric Schmidt committed Mar 13, 2023
1 parent 7a29c8e commit 838c911
Show file tree
Hide file tree
Showing 47 changed files with 3,287 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@
/dataproc/**/* @GoogleCloudPlatform/python-samples-reviewers
/datastore/**/* @GoogleCloudPlatform/cloud-native-db-dpes @GoogleCloudPlatform/python-samples-reviewers
/dialogflow/**/* @GoogleCloudPlatform/dee-data-ai @GoogleCloudPlatform/python-samples-reviewers
/dialogflow-cx/**/* @GoogleCloudPlatform/dee-data-ai @GoogleCloudPlatform/python-samples-reviewers
/dns/**/* @GoogleCloudPlatform/python-samples-reviewers
/documentai/**/* @GoogleCloudPlatform/dee-data-ai @GoogleCloudPlatform/python-samples-reviewers
/endpoints/**/* @GoogleCloudPlatform/python-samples-reviewers
/enterpriseknowledgegraph/**/* @GoogleCloudPlatform/dee-data-ai @GoogleCloudPlatform/python-samples-reviewers
/enterpriseknowledgegraph/**/* @GoogleCloudPlatform/dee-data-ai @GoogleCloudPlatform/python-samples-reviewers
/eventarc/**/* @GoogleCloudPlatform/aap-dpes @GoogleCloudPlatform/python-samples-reviewers
/error_reporting/**/* @GoogleCloudPlatform/python-samples-reviewers
/firestore/**/* @GoogleCloudPlatform/cloud-native-db-dpes @GoogleCloudPlatform/python-samples-reviewers
Expand Down
221 changes: 221 additions & 0 deletions dialogflow-cx/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@

.. This file is automatically generated. Do not edit this file directly.
Dialogflow CX API Python Samples
===============================================================================

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/README.rst


This directory contains samples for Dialogflow CX API. The `Dialogflow CX API`_ enables you to create conversational experiences across devices and platforms.




.. _Dialogflow CX API: https://cloud.google.com/dialogflow/cx/docs/


Setup
-------------------------------------------------------------------------------



Authentication
++++++++++++++

This sample requires you to have authentication setup. Refer to the
`Authentication Getting Started Guide`_ for instructions on setting up
credentials for applications.

.. _Authentication Getting Started Guide:
https://cloud.google.com/docs/authentication/getting-started




Install Dependencies
++++++++++++++++++++

#. Clone python-docs-samples and change directory to the sample directory you want to use.

.. code-block:: bash
$ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions.

.. _Python Development Environment Setup Guide:
https://cloud.google.com/python/setup

#. Create a virtualenv. Samples are compatible with Python 3.6+.

.. code-block:: bash
$ virtualenv env
$ source env/bin/activate
#. Install the dependencies needed to run the samples.

.. code-block:: bash
$ pip install -r requirements.txt
.. _pip: https://pip.pypa.io/
.. _virtualenv: https://virtualenv.pypa.io/






Samples
-------------------------------------------------------------------------------


Detect Intent Text
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/detect_intent_texts.py,/README.rst




To run this sample:

.. code-block:: bash
$ python detect_intent_texts.py
usage: detect_intent_texts.py [-h] --agent AGENT [--session-id SESSION_ID]
[--language-code LANGUAGE_CODE]
texts [texts ...]
DialogFlow API Detect Intent Python sample with text inputs.
Examples:
python detect_intent_texts.py -h
python detect_intent_texts.py --agent AGENT --session-id SESSION_ID "hello" "book a meeting room" "Mountain View"
python detect_intent_texts.py --agent AGENT --session-id SESSION_ID "tomorrow" "10 AM" "2 hours" "10 people" "A" "yes"
positional arguments:
texts Text inputs.
optional arguments:
-h, --help show this help message and exit
--agent AGENT Agent resource name. Required.
--session-id SESSION_ID
Identifier of the DetectIntent session. Defaults to a
random UUID.
--language-code LANGUAGE_CODE
Language code of the query. Defaults to "en-US".
Detect Intent Audio
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/detect_intent_audio.py,/README.rst




To run this sample:

.. code-block:: bash
$ python detect_intent_audio.py
usage: detect_intent_audio.py [-h] --agent AGENT [--session-id SESSION_ID]
[--language-code LANGUAGE_CODE]
--audio-file-path AUDIO_FILE_PATH
DialogFlow API Detect Intent Python sample with audio file.
Examples:
python detect_intent_audio.py -h
python detect_intent_audio.py --agent AGENT --session-id SESSION_ID --audio-file-path resources/hello.wav
optional arguments:
-h, --help show this help message and exit
--agent AGENT Agent resource name. Required.
--session-id SESSION_ID
Identifier of the DetectIntent session. Defaults to a
random UUID.
--language-code LANGUAGE_CODE
Language code of the query. Defaults to "en-US".
--audio-file-path AUDIO_FILE_PATH
Path to the audio file.
Detect Intent Stream
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=/detect_intent_stream.py,/README.rst




To run this sample:

.. code-block:: bash
$ python detect_intent_stream.py
usage: detect_intent_stream.py [-h] --agent AGENT [--session-id SESSION_ID]
[--language-code LANGUAGE_CODE]
--audio-file-path AUDIO_FILE_PATH
DialogFlow API Detect Intent Python sample with audio files processed as an audio stream.
Examples:
python detect_intent_stream.py -h
python detect_intent_stream.py --agent AGENT --session-id SESSION_ID --audio-file-path resources/hello.wav
optional arguments:
-h, --help show this help message and exit
--agent AGENT Agent resource name. Required.
--session-id SESSION_ID
Identifier of the DetectIntent session. Defaults to a
random UUID.
--language-code LANGUAGE_CODE
Language code of the query. Defaults to "en-US".
--audio-file-path AUDIO_FILE_PATH
Path to the audio file.
The client library
-------------------------------------------------------------------------------

This sample uses the `Google Cloud Client Library for Python`_.
You can read the documentation for more details on API usage and use GitHub
to `browse the source`_ and `report issues`_.

.. _Google Cloud Client Library for Python:
https://googlecloudplatform.github.io/google-cloud-python/
.. _browse the source:
https://github.com/GoogleCloudPlatform/google-cloud-python
.. _report issues:
https://github.com/GoogleCloudPlatform/google-cloud-python/issues



.. _Google Cloud SDK: https://cloud.google.com/sdk/
25 changes: 25 additions & 0 deletions dialogflow-cx/README.rst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This file is used to generate README.rst

product:
name: Dialogflow CX API
short_name: Dialogflow CX API
url: https://cloud.google.com/dialogflow/cx/docs/
description: >
The `Dialogflow CX API`_ enables you to create conversational experiences across devices and platforms.

setup:
- auth
- install_deps

samples:
- name: Detect Intent Text
file: detect_intent_texts.py
show_help: True
- name: Detect Intent Audio
file: detect_intent_audio.py
show_help: True
- name: Detect Intent Stream
file: detect_intent_stream.py
show_help: True

cloud_client_library: true
40 changes: 40 additions & 0 deletions dialogflow-cx/create_agent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


"""DialogFlow API Create Agent Sample"""

## [START dialogflow_cx_create_agent_sample]
from google.cloud.dialogflowcx_v3.services.agents.client import AgentsClient
from google.cloud.dialogflowcx_v3.types.agent import Agent


def create_agent(project_id, display_name):

parent = "projects/" + project_id + "/locations/global"

agents_client = AgentsClient()

agent = Agent(
display_name=display_name,
default_language_code="en",
time_zone="America/Los_Angeles",
)

response = agents_client.create_agent(request={"agent": agent, "parent": parent})

return response


## [END dialogflow_cx_create_agent_sample]
42 changes: 42 additions & 0 deletions dialogflow-cx/create_agent_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Test for create_agent"""

import os
import uuid

from google.cloud.dialogflowcx_v3.services.agents.client import AgentsClient
from google.cloud.dialogflowcx_v3.types.agent import DeleteAgentRequest

import pytest

from create_agent import create_agent

PROJECT_ID = os.getenv("GOOGLE_CLOUD_PROJECT")
pytest.AGENT_PATH = ""


def delete_agent(name):
agents_client = AgentsClient()
request = DeleteAgentRequest(name=name)
agents_client.delete_agent(request=request)


def test_create_agent():
agentName = f"fake_agent_{uuid.uuid4()}"
response = create_agent(PROJECT_ID, agentName)
delete_agent(response.name)

assert response.display_name == agentName

0 comments on commit 838c911

Please sign in to comment.