Skip to content

AI 代理节点常见问题#

¥AI Agent node common issues

以下是 AI 代理节点 的一些常见错误和问题,以及解决或故障排除步骤。

¥Here are some common errors and issues with the AI Agent node and steps to resolve or troubleshoot them.

内部错误:400 'content' 值无效#

¥Internal error: 400 Invalid value for 'content'

完整的错误信息可能如下所示:

¥A full error message might look like this:

1
2
3
Internal error
Error: 400 Invalid value for 'content': expected a string, got null.
<stack-trace>

如果提示输入包含空值,则可能会出现此错误。

¥This error can occur if the Prompt input contains a null value.

你可能会在以下两种情况下看到此错误:

¥You might see this in one of two scenarios:

  1. 当你将提示设置为“定义如下”且文本中包含未生成值的表达式时。

¥When you've set the Prompt to Define below and have an expression in your Text that isn't generating a value.

  • 要解决此问题,请确保你的表达式引用有效的字段,并且解析为有效的输入而不是 null。

    ¥To resolve, make sure your expressions reference valid fields and that they resolve to valid input rather than null. 2. 当你将提示设置为“已连接聊天触发节点”且传入数据包含空值时。

¥When you've set the Prompt to Connected Chat Trigger Node and the incoming data has null values.

  • 要解决此问题,请从输入节点的 chatInput 字段中删除所有 null 值。

    ¥To resolve, remove any null values from the chatInput field of the input node.

子节点“简单内存”中的错误#

¥Error in sub-node Simple Memory

当 n8n 遇到 Simple Memory 子节点问题时,会显示此错误。

¥This error displays when n8n runs into an issue with the Simple Memory sub-node.

这种情况最常发生在你的工作流或你复制的工作流模板使用了旧版本的简单内存节点(以前称为 "窗口缓冲区内存")时。

¥It most often occurs when your workflow or the workflow template you copied uses an older version of the Simple memory node (previously known as "Window Buffer Memory").

尝试从工作流中移除“简单内存”节点,然后再重新添加,这样可以确保你使用的是该节点的最新版本。

¥Try removing the Simple Memory node from your workflow and re-adding it, which will guarantee you're using the latest version of the node.

聊天模型子节点未连接错误#

¥A Chat Model sub-node must be connected error

当 n8n 尝试在未连接聊天模型的情况下执行节点时,会显示此错误。

¥This error displays when n8n tries to execute the node without having a Chat Model connected.

要解决此问题,请在节点打开时单击屏幕底部的“+ Chat Model”按钮,或在节点关闭时单击“Chat Model + connector”。n8n 随后会显示一系列可供选择的聊天模型。

¥To resolve this, click the + Chat Model button at the bottom of your screen when the node is open, or click the Chat Model + connector when the node is closed. n8n will then open a selection of possible Chat Models to pick from.

未指定错误提示#

¥No prompt specified error

当代理期望自动从上一个节点获取提示时,会出现此错误。通常,当你使用 Trigger Node 聊天 时,就会发生这种情况。

¥This error occurs when the agent expects to get the prompt from the previous node automatically. Typically, this happens when you're using the Chat Trigger Node.

要解决此问题,请找到 AI Agent 节点的 Prompt 参数,并将其从“Connected Chat Trigger Node”更改为“Define below”。此功能允许你通过引用其他节点的输出数据或添加静态文本来手动构建提示。

¥To resolve this issue, find the Prompt parameter of the AI Agent node and change it from Connected Chat Trigger Node to Define below. This allows you to manually build your prompt by referencing output data from other nodes or by adding static text.