Skip to content

演示代理和链之间的主要区别(Demonstration of key differences between agents and chains)#

在此工作流程中,你可以选择将聊天查询发送给代理。它展示了代理比链更强大的某些方式。

🌐 In this workflow you can choose whether your chat query goes to an agent or chain. It shows some of the ways that agents are more powerful than chains.

Workflow preview placeholder.

主要功能(Key features)#

此工作流程使用:

🌐 This workflow uses:

  • 聊天触发器:启动您的工作流程并回应用户的聊天互动。该节点提供了一个可自定义的聊天界面。
  • 切换节点:根据您在查询中指定的内容,将您的查询定向到代理或链。如果您说“代理”,它会将查询发送给代理。如果您说“链”,它会将查询发送给链。
  • Agent:Agent 节点与工作流的其他组件进行交互,并决定使用哪些工具
  • 基础 LLM 链:基础 LLM 链节点支持与连接的 LLM 聊天,但不支持记忆或工具。

使用示例(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.