Skip to content

简单内存节点#

¥Simple Memory node

使用“简单内存”节点在工作流中存储 persist 聊天记录。

¥Use the Simple Memory node to persist chat history in your workflow.

本页列出了 Simple Memory 节点支持的操作列表以及更多资源的链接。

¥On this page, you'll find a list of operations the Simple Memory node supports, and links to more resources.

Don't use this node if running n8n in queue mode

如果你的 n8n 实例使用 队列模式,则此节点在实际生产工作流中无法正常工作。这是因为 n8n 无法保证每次对“简单内存”的调用都会发送到同一个工作进程。

¥If your n8n instance uses queue mode, this node doesn't work in an active production workflow. This is because n8n can't guarantee that every call to Simple Memory will go to the same worker.

Parameter resolution in sub-nodes

Sub-nodes behave differently to other nodes when processing multiple items using an expression.

Most nodes, including root nodes, take any number of items as input, process these items, and output the results. You can use expressions to refer to input items, and the node resolves the expression for each item in turn. For example, given an input of five name values, the expression {{ $json.name }} resolves to each name in turn.

In sub-nodes, the expression always resolves to the first item. For example, given an input of five name values, the expression {{ $json.name }} always resolves to the first name.

节点参数#

¥Node parameters

配置以下参数以配置节点:

¥Configure these parameters to configure the node:

  • 会话密钥:输入用于存储工作流数据中内存的键。

¥Session Key: Enter the key to use to store the memory in the workflow data.

  • 上下文窗口长度:输入要作为上下文参考的先前交互次数。

¥Context Window Length: Enter the number of previous interactions to consider for context.

模板和示例#

¥Templates and examples

Template widget placeholder.

相关资源#

¥Related resources

有关服务的更多信息,请参阅 LangChain 的缓冲区窗口内存文档

¥Refer to LangChain's Buffer Window Memory documentation for more information about the service.

View n8n's Advanced AI documentation.

常见问题#

¥Common issues

有关常见问题或建议的解决方案,请参阅 常见问题

¥For common questions or issues and suggested solutions, refer to Common issues.