围绕笔记本与 Gemini Chat
本文档介绍了如何使用 Gemini in Colab Enterprise(Gemini for Google Cloud 产品组合中的一款产品)围绕笔记本进行对话。
了解 Gemini for Google Cloud 如何以及何时使用您的数据。
本文档适用于使用 Colab Enterprise 的数据分析师、数据科学家和数据开发者。本文档假定您了解如何在笔记本环境中编写代码。
概览
您可以与 Gemini 围绕潜在的编码解决方案,或者如何在笔记本中完成特定任务来进行对话。您还可以获取有关笔记本中代码的说明。
例如,您可以先使用类似如下的提示:
- 如何过滤 Pandas DataFrame?
- 如何在 Colab Enterprise 中创建图表?
- 向我显示公开提供的数据集列表。
- 总结此笔记本的用途。
Gemini 会将您的笔记本作为上下文。您可以讨论相关细节,获取有关改进代码的建议,或获取有关下一步尝试的想法。
准备工作
- 确保已为您的 Google Cloud 用户账号和项目设置了 Colab Enterprise 中的 Gemini。
Enable the Agent Platform, Gemini for Google Cloud, Dataform, and Compute Engine APIs.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.
所需的角色
如需获得在 Colab Enterprise 中使用 Gemini 所需的权限,请让您的管理员为您授予项目的以下 IAM 角色:
- Colab Enterprise User (
roles/aiplatform.colabEnterpriseUser)