
准备工作
- 实验会创建一个 Google Cloud 项目和一些资源,供您使用限定的一段时间
- 实验有时间限制,并且没有暂停功能。如果您中途结束实验,则必须重新开始。
- 在屏幕左上角,点击开始实验即可开始
In this lab, you will explore the management of Conversational Agents environments. By the end of this lab, you will be able to:
The following are some resources intended to help you complete the lab components:
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources will be made available to you.
This Qwiklabs hands-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Note: If you already have your own personal Google Cloud account or project, do not use it for this lab.
Note: If you are using a Pixelbook, open an Incognito window to run this lab.
In this task, you'll get logged into Conversational Agents and create a new agent.
Enable the Dialogflow API and Vertex AI Applications API.
In your Google Cloud Console, navigate to AI Applications > Conversational agent.
Click on Build your own when prompted to create an agent.
Name your agent Flight Booker .
Set the location to
Ensure timezone and default language are set appropriately. Set the Conversation Start to Flow.
Click on Create. Once the agent is created, you will see the design and configuration of the Conversational Agents UI.
In this task, you will import a Conversational Agent from an earlier lab.
Click the up-and-down arrows at the action bar of the Conversational Agents UI.
Click Restore Agent from the expanded menu options.
Select the Cloud Storage radio button if not already selected.
Enter gs://cloud-training/T-CECCAI-I/T-CCAICDCX-I/lab-solns/Cloudio-cx-speak-to-person.blob
for URI.
Click Restore.
Refer to the Conversational Agents restore documentation as needed.
Now you have a conversational agent that has everything completed from an earlier lab.
In the Google Cloud Console, navigate to Conversational Agents > Environments.
Click + Create to create a new environment.
Enter QA
for the display name.
Click on Save.
You'll see a message saying Version must be provided for start flow resource
. Why do you think this is?
Hint: We haven't yet created a published version of the Default Start Flow (or any other flow for that matter).
Select Versions in the main side menu.
Click the Flows tab and then on Default Start Flow
.
Click + Create to create a version of the flow.
Enter Cloudio main v1 basic chat bot
for the display name and description.
Click Save.
You should now see the Default Start Flow in the Versions list with the number of # versions
equal to 1.
Select Environments to return to configuring a new environment.
Click + Create.
Enter QA
for the display name.
Choose Cloudio main v1 basic chat bot
from the Version dropdown list next to the Default Start Flow.
Click Save.
You may see a message such as:
This is caused when Conversational Agents is still capturing and training your conversational agent. Try saving again after waiting a few moments.
You should now see your new QA environment in the list.
Next, you can test out your versioned conversational agent in the environment you created.
Click on Toogle Simulator in the upper right to open the simulator pane and select the QA environment that you just created.
Enter Is there a customer service rep I can talk to?
in the text box.
You should get a response from the agent saying "Please stand by while I connect you with a customer service representative."
This is one of the ways you can run test cases in different environments.
Next, you'll make a change to your conversational agent and save it as a new version.
Navigate to Conversational Agents > Flows > Build.
Click on the Speak to Person page.
Click on the Entry fulfillment that says Please stand by while I connect you with a customer service representative.
Change the Agent says prompt to I'll get you to a live agent right away.
Click on Save.
Go back to Conversational Agents > Versions > Flows.
Repeat the versioning steps above to create a new version of your Default Start Flow called Cloudio main v2 basic chat bot
.
Repeat the steps above to create a new environment called Dev
that uses the new version of your Default Start Flow.
You should now see the number of versions incremented to 2 for the Default Start Flow in the Versions list.
Click on QA
in your Environments section.
Select your Cloudio main v2 basic chat bot
from the dropdown.
Click on Save.
Now your latest version of your flow is loaded to the QA environment.
Next you'll go back to the toggle simulator to test your new Cloudio main v2 basic chat bot
version.
Enter Is there a customer service rep I can talk to?
in the text box and select the Environment to be Dev.
You should get a response from the agent saying I'll get you to a live agent right away.
indicating that it was running the v2 of your agent.
That's it! Now you can manage different versions and run tests in different environments.
In the Conversational Agents Console, navigate to Playbooks.
Click + Create and select Task as the type of Playbook.
Name the Playbook Weather bot
.
Set the goal Welcome customers to the chat, introduce yourself, and answer questions about the weather
.
Add the following instructions:
Click Save.
Click Version history and then Create version.
Set the name as v1
and click Save.
Navigate to Environments and click on QA.
Under Playbooks, locate the Weather bot, select v1
and click save.
Open the simulator and, select the QA environment and the Weather bot as Start resource.
Enter the following 2 sentences to see that the bot's name is John and the weather is sunny:
In the Conversational Agents Console, navigate to Tools.
Click Create and name it weather
.
Select type Function.
In the Parameter Schemas section, under Samples, select getWeather. This pre-fills the input and output parameters.
Click Save.
Click Version History, Create version, name it v1
and click save.
Navigate to Playbooks > Weather bot.
Under available tools at the bottom select the weather function.
Replace the last line of the instructions with the following sentence: - Always answer questions about the weather asking the ${TOOL:weather}
.
Click Save.
Click Version history, Create version, name it v2
and click save.
Navigate to Environments and click on Dev.
Under Playbooks, locate the Weather bot, select v2
and under Tools, locate the weather tool, select v1
and click save.
Open the simulator and, select the Dev environment and the Weather bot as Start resource.
Enter the following 2 sentences to see that the bot's name is John and that the weather tool is called:
The weather in Berlin is 30 degrees.
When you have completed your lab, click End Lab. Qwiklabs removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Copyright 2023 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
此内容目前不可用
一旦可用,我们会通过电子邮件告知您
太好了!
一旦可用,我们会通过电子邮件告知您
一次一个实验
确认结束所有现有实验并开始此实验