dsh-memory-engine 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +22 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -51,6 +51,28 @@ memory_map(out="D:\\memory-map.html")
51
51
 
52
52
  旧的历史数据不会自己进来,需要按下一节导入。
53
53
 
54
+ ## 怎么让机器人自己记记忆
55
+
56
+ 插件只会存取,**不会自己判断什么值得记**。要不要调 `memory_save`,由 agent 决定;它得知道该记什么。
57
+
58
+ 想让记忆真的长起来,在 agent 的提示词/角色卡里加一段(可直接复制):
59
+
60
+ ```text
61
+ 聊天时遇到这些,用 memory_save 记下来:
62
+ · 对方的称呼、偏好、忌讳、习惯(kind="印象",who 填对方名字)
63
+ · 答应过的事、约定、承诺(kind="对话")
64
+ · 情绪特别重的瞬间(kind="事件",heat=1)
65
+ · 新学到的知识、名词、梗的解释(kind="知识")
66
+ · 每天结束时,用一两句写当天小结(kind="日记")
67
+
68
+ 不用每条都记。一天三五条就够,宁可少存也别灌水。
69
+ 存之前先 memory_recall 查一下,避免重复。
70
+ ```
71
+
72
+ **为什么必须写这段**:工具描述只说明「能存」,不会告诉模型「该存什么」。不写提示词的结果是——装了一周,图还是空的。
73
+
74
+ 这个插件的作者给自家机器人的做法是:除了上面的提示词,还额外跑一个夜间任务,从当天聊天记录里自动提炼印象(那部分不在本插件里,属于她的私有机器人适配器)。
75
+
54
76
  ## 保存和召回
55
77
 
56
78
  让 agent 使用:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-memory-engine",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Local DSH memory engine with neuron network visualization and private file import",
5
5
  "keywords": [
6
6
  "dsh",