开始使用 Gemini Enterprise
Gemini Enterprise 汇集了功能强大的深度信息检索、先进的自然语言处理和最新的大型语言处理技术进步成果,可以理解用户意图并返回与用户相关度最高的结果。
在学习本教程之前,确保您已完成准备工作中的步骤。
如需在 Google Cloud 控制台中直接遵循有关此任务的分步指导,请点击操作演示:
准备工作
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Vertex AI, Gemini Enterprise (Discovery Engine), Cloud Storage, Identity and Access Management APIs.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. -
Make sure that you have the following role or roles on the project: Discovery Engine Admin
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
前往 IAM - 选择项目。
- 点击 授予访问权限。
-
在新的主账号字段中,输入您的用户标识符。 这通常是 Google 账号的电子邮件地址。
- 在选择角色列表中,选择一个角色。
- 如需授予其他角色,请点击 添加其他角色,然后添加其他各个角色。
- 点击 Save(保存)。
-
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Vertex AI, Gemini Enterprise (Discovery Engine), Cloud Storage, Identity and Access Management APIs.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. -
Make sure that you have the following role or roles on the project: Discovery Engine Admin
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
前往 IAM - 选择项目。
- 点击 授予访问权限。
-
在新的主账号字段中,输入您的用户标识符。 这通常是 Google 账号的电子邮件地址。
- 在选择角色列表中,选择一个角色。
- 如需授予其他角色,请点击 添加其他角色,然后添加其他各个角色。
- 点击 Save(保存)。
-
在 Google Cloud 控制台中,前往 Gemini Enterprise 页面。
在 Gemini Enterprise 卡片下,选择管理。这会在 Google Cloud 控制台中打开 Gemini Enterprise。
点击创建应用。
在 Gemini Enterprise 下,点击创建。
在您的应用名称下方,输入应用的名称。应用 ID 显示在应用名称下方。
在贵公司或组织的外部名称下方,输入公司或组织的名称。在本教程中,您可以使用
Cymbal Bank
。选择 global(全球级)作为应用的位置。
点击继续。
点击创建数据存储区。
在 Cloud Storage 下,点击选择。
在您要导入哪种数据?下,确保已选择非结构化文档(PDF、HTML、TXT 等)。
在同步频率下,确保已选择一次。
在选择您要导入的文件夹或文件下,确保已选择文件夹。
在
gs://
字段中输入以下值:cloud-samples-data/gen-app-builder/search/cymbal-bank-employee
此 Cloud Storage 存储桶包含虚构银行 Cymbal Bank 内部使用的 PDF 文件。
点击继续。
在数据存储区名称下,输入数据存储区的名称,然后点击创建。
选择您刚刚创建的数据存储区,然后点击页面底部的创建。
在导航菜单中,点击
预览 以测试搜索应用。可选:点击视图图标,在移动版视图和桌面版视图之间切换。
在搜索栏中,针对我们导入的数据提出问题;例如,询问
How do I book business travel?
如果此问题的答案未明确提及 Cymbal Bank,请再等几分钟,然后重试。
提出其他问题,例如:
Who founded Cymbal Bank?
或Where are the headquarters of Cymbal Bank?
在导航菜单中,点击配置。
在界面标签页中,为搜索应用配置设置。
不同数据类型可使用不同的界面配置。如需了解详情,请参阅为界面配置结果。
如果您在界面标签页中更改配置,请点击保存并发布。
前往自动补全标签页,为自动补全配置特定设置。
请务必将启用自动补全设置为立即,并预计需要等待一两天才能看到自动补全建议。
前往控件标签页,配置投放控件。
前往助理标签页,为搜索助理配置设置。
在导航菜单中,点击集成。
确保启用 Web 应用已启用。
在指向您 Web 应用的链接部分中,点击复制,然后在浏览器中打开该链接。
可选:复制网址并将其发送给用户,以与用户共享搜索应用。用户可以将 Web 应用网址加入书签,以便日后访问。
- 若不再需要该项目,请使用Google Cloud console 将其删除,以避免产生不必要的 Google Cloud 费用。
- 如果您为了解 Gemini Enterprise 创建了一个新项目,但现在不再需要它,请删除项目。
- 如果您使用的是现有 Google Cloud 项目,请删除您创建的资源,以避免您的账号产生费用。如需了解详情,请参阅删除应用和删除数据存储区。
- 按照关闭 Gemini Enterprise 中的步骤操作。
- 详细了解 Gemini Enterprise。
- 详细了解应用和数据存储区。
创建 Gemini Enterprise 应用
创建数据存储区
预览应用
配置搜索 Web 应用
查看搜索 Web 应用
如需查看 Gemini Enterprise Web 应用,请执行以下操作:
清理
为避免因本页中使用的资源导致您的 Google Cloud 账号产生费用,请按照以下步骤操作。