mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 09:48:22 +08:00
docs: make English the default docs language and fix link paths
This commit is contained in:
@@ -1,43 +1,43 @@
|
||||
---
|
||||
title: memory - 记忆与知识
|
||||
description: 搜索和读取长期记忆及知识库文件
|
||||
title: memory - Memory & Knowledge
|
||||
description: Search and read long-term memory and knowledge base files
|
||||
---
|
||||
|
||||
记忆工具包含两个子工具:`memory_search`(搜索记忆)和 `memory_get`(读取记忆或知识文件)。
|
||||
The memory tool contains two sub-tools: `memory_search` (search memory) and `memory_get` (read memory or knowledge files).
|
||||
|
||||
当 [知识库](/knowledge) 功能开启时,这两个工具同时支持访问 `memory/` 和 `knowledge/` 目录下的文件。
|
||||
When the [knowledge base](/knowledge) feature is enabled, both tools also support accessing files under the `knowledge/` directory.
|
||||
|
||||
## 依赖
|
||||
## Dependencies
|
||||
|
||||
无额外依赖,默认可用。由 Agent Core 的记忆系统管理。
|
||||
No extra dependencies, available by default. Managed by the Agent Core memory system.
|
||||
|
||||
## memory_search
|
||||
|
||||
搜索历史记忆和知识库内容,支持关键词和向量混合检索。
|
||||
Search historical memory and knowledge base content with hybrid keyword and vector retrieval.
|
||||
|
||||
| 参数 | 类型 | 必填 | 说明 |
|
||||
| Parameter | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `query` | string | 是 | 搜索查询 |
|
||||
| `query` | string | Yes | Search query |
|
||||
|
||||
## memory_get
|
||||
|
||||
读取特定记忆文件或知识库文件的内容。
|
||||
Read the content of a specific memory or knowledge file.
|
||||
|
||||
| 参数 | 类型 | 必填 | 说明 |
|
||||
| Parameter | Type | Required | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `path` | string | 是 | 文件的相对路径(如 `MEMORY.md`、`memory/2026-01-01.md`、`knowledge/concepts/rag.md`) |
|
||||
| `start_line` | integer | 否 | 起始行号 |
|
||||
| `end_line` | integer | 否 | 结束行号 |
|
||||
| `path` | string | Yes | Relative path to the file (e.g. `MEMORY.md`, `memory/2026-01-01.md`, `knowledge/concepts/rag.md`) |
|
||||
| `start_line` | integer | No | Start line number |
|
||||
| `end_line` | integer | No | End line number |
|
||||
|
||||
## 工作方式
|
||||
## How It Works
|
||||
|
||||
Agent 会在以下场景自动调用记忆工具:
|
||||
The Agent automatically invokes memory tools in these scenarios:
|
||||
|
||||
- 用户分享重要信息时 → 存储到记忆
|
||||
- 需要参考历史信息时 → 搜索相关记忆
|
||||
- 对话达到一定长度时 → 提取摘要存储
|
||||
- 讨论到专业知识时 → 检索知识库中的相关页面
|
||||
- When the user shares important information → stores to memory
|
||||
- When historical context is needed → searches relevant memory
|
||||
- When conversation reaches a certain length → extracts summary for storage
|
||||
- When discussing domain knowledge → retrieves relevant pages from the knowledge base
|
||||
|
||||
<Note>
|
||||
当 `knowledge` 配置为 `false` 时,工具的描述和搜索范围会自动调整为仅包含记忆文件。
|
||||
When `knowledge` is set to `false` in config, the tool descriptions and search scope automatically adjust to include only memory files.
|
||||
</Note>
|
||||
|
||||
Reference in New Issue
Block a user