Skip to content

问答链节点通用信息问题#

¥Question and Answer Chain node common issues

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

¥Here are some common errors and issues with the Question and Answer Chain node and steps to resolve or troubleshoot them.

未指定错误提示#

¥No prompt specified error

当提示为空或无效时,会显示此错误。

¥This error displays when the Prompt is empty or invalid.

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

¥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.

  • 要解决此问题,请在“文本”字段中输入有效的提示。

    ¥To resolve, enter a valid prompt in the Text field.

  • 确保所有表达式都引用有效字段,并且解析为有效输入而不是 null。

    ¥Make sure any 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 字段。添加一个 编辑字段(设置) 节点来将传入的字段名称编辑为 chatInput

    ¥To resolve, make sure your input contains a chatInput field. Add an Edit Fields (Set) node to edit an incoming field name to chatInput.

  • 移除输入节点 chatInput 字段中的所有空值。

    ¥Remove any null values from the chatInput field of the input node.

检索器子节点未连接错误#

¥A Retriever sub-node must be connected error

当 n8n 尝试在未连接检索器的情况下执行节点时,会显示此错误。

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

要解决此问题,请在节点打开时单击屏幕底部的“+ Retriever”按钮,或在节点未打开时单击“Retriever + connector”。n8n 随后会显示一系列可供选择的检索器。

¥To resolve this, click the + Retriever button at the bottom of your screen when the node is open, or click the Retriever + connector when the node isn't open. n8n will then open a selection of possible Retrievers to pick from.

无法生成更长的响应#

¥Can't produce longer responses

如果你需要生成比问答链节点默认生成的更长的响应,你可以尝试以下一种或多种方法:

¥If you need to generate longer responses than the Question and Answer Chain node produces by default, you can try one or more of the following techniques:

  • 连接更详细的模型:某些 AI 模型比其他模型产生更简洁的结果。将你的模型替换为具有更大上下文窗口和更详细输出的模型可以增加响应的单词长度。

¥Connect a more verbose model: Some AI models produce more terse results than others. Swapping your model for one with a larger context window and more verbose output can increase the word length of your responses.

  • 增加最大令牌数:许多模型节点(例如 OpenAI 聊天模型)都包含“最大令牌数”选项。你可以设置此值以增加模型用于生成响应的最大令牌数。

¥Increase the maximum number of tokens: Many model nodes (for example the OpenAI Chat Model) include a Maximum Number of Tokens option. You can set this to increase the maximum number of tokens the model can use to produce a response.

  • 分阶段构建更复杂的响应:为了获得更详细的答案,你可能需要使用各种 AI 节点分阶段构建回复。你可以使用 AI 将单个问题拆分为多个提示,并为每个提示创建响应。然后你可以再次合并回复,撰写最终回复。虽然细节有所不同,但你可以在此 使用 AI 编写 WordPress 文章的模板 中找到一个体现总体思路的良好示例。

¥Build larger responses in stages: For more detailed answers, you may want to construct replies in stages using a variety of AI nodes. You can use AI split up a single question into multiple prompts and create responses for each. You can then compose a final reply by combining the responses again. Though the details are different, you can find a good example of the general idea in this template for writing a WordPress post with AI.