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

docs: add DetectIntent samples #500

Merged
merged 61 commits into from Jul 12, 2022

Conversation

aribray
Copy link
Contributor

@aribray aribray commented Jun 29, 2022

Adds the following DetectIntent samples:

  • detectIntent with IntentInput
  • detectIntent with EventInput
  • detectIntent with synthesized TTS output
  • detectIntent with disabled webhook
  • detectIntent with sentiment analysis
  • streamingDetectIntent with partial response enabled
  • detectIntent with AudioInput

aribray and others added 23 commits May 18, 2022 17:39
…red sample and test

Change-Id: I75bed489bd8abefca60263acb266501810c0e856
Change-Id: I18be2a5c1d46ac9838cf4a15ab87dcf331ee26ee
Change-Id: Ia85899f678ef1382718c2443a682770417340af2
Change-Id: I4dd56107a3197027f287980fa87a15e962154783
Change-Id: I8dcdb0dcaad486a2fb69e0737df99bda49b28839
Change-Id: I5f4521b3e50660f30f9f73da3d939da213084d28
Change-Id: I39dedfba1b62be5cb4580a42dde270146f3b6f97
Change-Id: Ic54ae0d1f091079661f3fa67097cdcd2e888dc90
Change-Id: Ifd303b7395844240dca0b29cde9b791112fcabe5
Change-Id: I59e45da9f9e57b327a527f1405816ac1275fe1c8
Change-Id: Ic2eb71f5d30ea0c53f9fe2264aa4b2a3f5cec3c8
Change-Id: I70ff4118cc8b3111a3ed55a2fae32258d3f6819c
Change-Id: I62b7e34fef632635b3281d60058ee40000b211ef
…alogflow-cx into aribray--webhook-samples

Change-Id: I751bab7fd1a6d098da1475a82eb63785fe30464a
Change-Id: I395dd5abc9a48733126ab0ecdc2a974fbf9eb471
Change-Id: Ia599ab7f4d432477d9952b4e12c709845f1ad97b
Change-Id: I8cdf93fd9e21161757d198b1338c5ab77bb3a236
Change-Id: I90f1f626588fd59c116d119348054c914945cd1d
Change-Id: I5ff686ab2ffc94b358bdf87b8dfc3d00f5e45657
Change-Id: I4a2bef88da7ed04d343da63544563130182e6aaf
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: dialogflow Issues related to the googleapis/java-dialogflow-cx API. labels Jun 29, 2022
@snippet-bot
Copy link

snippet-bot bot commented Jun 29, 2022

Here is the summary of changes.

You are about to add 7 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jun 29, 2022
Change-Id: I8e6a26441a79b1ed44def4877c822040cb143e33
…ava-dialogflow-cx into aribray--detect-intent-samples

Change-Id: I665bbab77d49baa7626f101da5e2e1442b176f37
Change-Id: I741c73d3f14bfe5f9b4ff6ec55d43f2687ac51dd
…ava-dialogflow-cx into aribray--detect-intent-samples

Change-Id: I82b8512833a44c451f7f754022a67ddb7e50fbbd
@aribray aribray added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 30, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 30, 2022
@aribray aribray added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 1, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 1, 2022
Copy link
Contributor

@lesv lesv left a comment

Choose a reason for hiding this comment

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

A few suggestions / questions:

  • where UUID's are expected, perhaps you should actually create UUID's.
  • Method comments may be appropriate in places.
  • Tests don't appear to understand that they can be running in 9 separate instances at once.
  • I don't see a lot of cleaning up of resources in tests. Both what your creating in the moment, and stuff that might be left over after a crash.

Comment on lines +35 to +38
private static String AGENT_ID =
System.getenv()
.getOrDefault("DIALOGFLOW_CX_AGENT_ID_GLOBAL", "b8d0e85d-0741-4e6d-a66a-3671184b7b93");
private static String INTENT_ID = "00000000-0000-0000-0000-000000000000";
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these be real UUID's? Remember you might have 9 of these running at the same time in different processes / processors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Each agent has a unique Agent ID that's created by Dialogflow. There was a permanent "TestAgent" resource created for the samples, and it has its own Flow IDs, Page IDs, etc. that are also created by Dialogflow (00000000-0000-0000-0000-000000000000 is the Default Welcome Intent Flow ID).

Am I understanding the question correctly? I can go in and create a new intent by hand as well, if that makes more sense.

Comment on lines +34 to +36
private static String AGENT_ID =
System.getenv()
.getOrDefault("DIALOGFLOW_CX_AGENT_ID_GLOBAL", "b8d0e85d-0741-4e6d-a66a-3671184b7b93");
Copy link
Contributor

Choose a reason for hiding this comment

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

Real UUID?

Change-Id: Iac48159892b0b6a34f31b013d446dfd66e62b8a7
Change-Id: I8e3fcea6a24739cb7a1e49d7572688e22d4d0147
Change-Id: I29f4cb587b10f46576aa36a56cde8c8fcb6e1acb
Change-Id: I327b7e90d8562c9698bc1fc4324ec249c6326436
Change-Id: If9937d41cefcff2fa0480524d036aecf5a1fda40
Change-Id: I9980a07e9c2ca377f669f0b80bbf16a42033d634
@aribray aribray added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 7, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 7, 2022
@aribray aribray added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 12, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 12, 2022
@aribray aribray added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 12, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 12, 2022
Change-Id: I5115e749e47427c50e2ed0ad494525dc6f9be66a
Change-Id: Ibe5abeee5b6b003fc8c77eb53eb432a340629255
@aribray aribray added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 12, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 12, 2022
@aribray aribray merged commit 2c5f9c2 into googleapis:main Jul 12, 2022
@aribray aribray deleted the aribray--detect-intent-samples branch July 12, 2022 12:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: dialogflow Issues related to the googleapis/java-dialogflow-cx API. samples Issues that are directly related to samples. size: xl Pull request size is extra large.
Projects
None yet
4 participants