Files
chatgpt-on-wechat/docs/ja/tools/memory.mdx
2026-03-18 19:13:39 +09:00

37 lines
1.3 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: memory - メモリ
description: 長期メモリの検索と読み取り
---
メモリToolには `memory_search`(メモリ検索)と `memory_get`メモリファイル読み取りの2つのサブToolがあります。
## 依存関係
追加の依存関係は不要で、デフォルトで利用可能です。Agent Coreのメモリシステムによって管理されます。
## memory_search
キーワードとベクトルのハイブリッド検索で過去のメモリを検索します。
| パラメータ | 型 | 必須 | 説明 |
| --- | --- | --- | --- |
| `query` | string | はい | 検索クエリ |
## memory_get
特定のメモリファイルの内容を読み取ります。
| パラメータ | 型 | 必須 | 説明 |
| --- | --- | --- | --- |
| `path` | string | はい | メモリファイルの相対パス(例:`MEMORY.md`、`memory/2026-01-01.md` |
| `start_line` | integer | いいえ | 開始行番号 |
| `end_line` | integer | いいえ | 終了行番号 |
## 仕組み
Agentは以下のシナリオでメモリToolを自動的に呼び出します
- ユーザーが重要な情報を共有した場合 → メモリに保存
- 過去のコンテキストが必要な場合 → 関連するメモリを検索
- 会話が一定の長さに達した場合 → 要約を抽出して保存