Skip to content

人工智能中的记忆是什么?#

¥What's memory in AI?

内存是 AI 聊天服务的重要组成部分。memory 保留先前消息的历史记录,从而允许与 AI 进行持续对话,而不是每次交互都从头开始。

¥Memory is a key part of AI chat services. The memory keeps a history of previous messages, allowing for an ongoing conversation with the AI, rather than every interaction starting fresh.

n8n 中的 AI 记忆#

¥AI memory in n8n

要向 AI 工作流添加内存,你可以使用以下任一方法:

¥To add memory to your AI workflow you can use either:

  • Simple Memory:存储当前会话的可自定义长度的聊天记录。这是最容易上手的方法。

¥Simple Memory: stores a customizable length of chat history for the current session. This is the easiest to get started with.

  • n8n 提供的内存服务之一。其中包括:

¥One of the memory services that n8n provides nodes for. These include:

如果你需要在工作流中进行高级 AI 内存管理,请使用 聊天内存管理器 节点。

¥If you need to do advanced AI memory management in your workflows, use the Chat Memory Manager node.

This node is useful when you:

  • Can't add a memory node directly.
  • Need to do more complex memory management, beyond what the memory nodes offer. For example, you can add this node to check the memory size of the Agent node's response, and reduce it if needed.
  • Want to inject messages to the AI that look like user messages, to give the AI more context.