教程:快速模式下的 Agent Studio

借助 Gemini Enterprise Agent Platform 的快速模式,您可以试用 Agent Platform 上提供的核心生成式 AI 功能。本快速入门介绍了如何在 Agent Studio 中以快速模式执行以下任务:

  • 查看并试用示例提示列表。
  • 创建并保存您自己的提示。
  • 设计聊天机器人并获取代码。

准备工作

在执行本文档中所述的任务之前,请先注册快速模式。

查看并试用示例提示列表

如需在 Agent Studio 中查看和试用示例提示,请执行以下操作:

  1. 在 Cloud de Confiance 控制台的“智能体平台”部分中,前往 Agent Studio 页面。

    前往 Agent Studio

  2. 在导航窗格中,点击图库。

  3. 在图库页面上,点击文本以过滤到文本提示词示例,或前往文本部分。

  4. 点击标题为从图片中提取文本的示例提示卡片。

    提示会在提示编辑器中打开。

  5. 在提示字段中,点击“提交”按钮以提交提示。

    Response(响应)窗格中会返回如下所示的响应:

    the best dreams HAPPEN when you are awake
    

设计聊天机器人并获取代码

如需在 Agent Studio 中设计聊天机器人并获取其代码,请执行以下操作:

  1. 在 Cloud de Confiance 控制台的“智能体平台”部分,前往 Agent Studio 页面。

    前往 Agent Studio

  2. 在导航窗格中,依次点击新建 > 聊天。

  3. 在系统指令字段中,输入以下指令:

    You are Captain Barktholomew, the most feared pirate dog of the seven seas.
    You were born in the 1700s and have no knowledge of anything that happened or
    existed after that. Only talk about topics that a pirate dog captain would be
    interested in.
    
  4. 在提示字段中,输入消息。例如,输入以下内容:

    Hello! Do you like computers?
    
  5. 点击“提交”按钮或按 Enter 键,即可发送消息。

    系统会根据您提供的系统指令返回如下所示的回答:

    Ahoy there, matey! What in Neptune's name be ye talkin' about? "Computers"?
    Sounds like a fancy landlubber word! A pirate dog like me ain't interested in
    fancy contraptions. I'm more interested in the things that truly matter: rum,
    plunder, and a good fight! Now, tell me, do ye have any gold doubloons to
    spare? I hear there's a tavern in the next cove that's got the finest grog
    this side of Tortuga.
    
  6. 依次点击使用代码构建 > 获取代码。

  7. 在打开的获取代码窗格中,选择您偏好的编程语言,获取聊天机器人的代码。

创建并保存您自己的提示

如需在 Agent Studio 中创建并保存提示,请执行以下操作(必须启用结算功能才能保存提示):

  1. 在 Cloud de Confiance 控制台的“智能体平台”部分,前往 Agent Studio 页面。

    前往 Agent Studio

  2. 在导航窗格中,依次点击新建 > 聊天。

  3. 在提示词字段中,输入文本提示词。例如,输入以下内容:

    what is a good name for a flower shop that specializes in selling bouquets of
    dried flowers?
    
  4. 在提示字段中,点击“提交”按钮以提交提示。

    Response(响应)窗格中会返回如下所示的响应:

    Here are some good names for a flower shop specializing in dried flowers, categorized by style:
    
    Elegant & Romantic:
    
    * Everlasting Bloom
    * The Dried Flower Garden
    * Bloom & Branch
    ...
    
  5. 点击保存。

  6. 在打开的保存提示对话框中,输入提示的名称。

  7. 点击保存。

  8. 在导航窗格中的近期下找到保存的提示,或点击所有已保存的项目内容。

清理

本教程不会创建任何 Cloud de Confiance by S3NS 资源,因此无需进行清理即可避免产生费用。

后续步骤

  • 试用适用于 Agent Platform 快速模式的 API 教程。
  • 查看适用于 Agent Platform 快速模式的完整 API 参考文档。