Skip to content

为 AI 工作流提供人工回退#

¥Have a human fallback for AI workflows

这是一个尝试使用标准 GPT-4 模型回答用户查询的工作流。如果无法回答问题,它会向 Slack 发送消息以寻求人工帮助。它会提示用户提供电子邮件地址。

¥This is a workflow that tries to answer user queries using the standard GPT-4 model. If it can't answer, it sends a message to Slack to ask for human help. It prompts the user to supply an email address.

此工作流使用 聊天触发器 提供聊天界面,并使用 调用 n8n 工作流工具 调用第二个工作流来处理电子邮件地址的检查和 Slack 消息的发送。

¥This workflow uses the Chat Trigger to provide the chat interface, and the Call n8n Workflow Tool to call a second workflow that handles checking for email addresses and sending the Slack message.

Workflow preview placeholder.

主要功能#

¥Key features

此工作流程使用:

¥This workflow uses:

  • 聊天触发器:启动你的工作流并响应用户聊天互动。该节点提供可自定义的聊天界面。

¥Chat Trigger: start your workflow and respond to user chat interactions. The node provides a customizable chat interface.

  • 代理:AI 工作流的关键部分。代理与工作流的其他组件交互,并决定使用哪些工具。

¥Agent: the key piece of the AI workflow. The Agent interacts with other components of the workflow and makes decisions about what tools to use.

  • 调用 n8n 工作流工具:将 n8n 工作流作为自定义工具插入。在 AI 中,工具是 AI 可以用来与外部世界(在本例中,指你的工作流提供的数据)交互的界面。它允许 AI 模型访问其内置数据集之外的信息。

¥Call n8n Workflow Tool: plug in n8n workflows as custom tools. In AI, a tool is an interface the AI can use to interact with the world (in this case, the data provided by your workflow). It allows the AI model to access information beyond its built-in dataset.

使用示例#

¥Using the example

To load the template into your n8n instance:

  1. Download the workflow JSON file.
  2. Open a new workflow in your n8n instance.
  3. Copy in the JSON, or select Workflow menu Workflow menu icon > Import from file....

The example workflows use Sticky Notes to guide you:

  • Yellow: notes and information.
  • Green: instructions to run the workflow.
  • Orange: you need to change something to make the workflow work.
  • Blue: draws attention to a key feature of the example.