memory-lancedb-pro 1.0.14 → 1.0.16
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.
- package/CHANGELOG.md +12 -0
- package/README.md +10 -0
- package/README_CN.md +10 -0
- package/index.ts +13 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.16
|
|
4
|
+
|
|
5
|
+
- Feat: expand memory capture triggers to support Traditional Chinese (繁體中文) in addition to Simplified Chinese, and improve category detection keywords.
|
|
6
|
+
|
|
7
|
+
## 1.0.15
|
|
8
|
+
|
|
9
|
+
- Docs: add troubleshooting note for LanceDB/Arrow returning `BigInt` numeric columns, and confirm the plugin coerces numeric fields via `Number(...)` for compatibility.
|
|
10
|
+
|
|
11
|
+
## 1.0.14
|
|
12
|
+
|
|
13
|
+
- Fix: coerce LanceDB/Arrow numeric columns that may arrive as `BigInt` (`timestamp`, `importance`, `_distance`, `_score`) into `Number(...)` to avoid runtime errors like "Cannot mix BigInt and other types" on LanceDB 0.26+.
|
|
14
|
+
|
|
3
15
|
## 1.0.13
|
|
4
16
|
|
|
5
17
|
- Fix: Force `encoding_format: "float"` for OpenAI-compatible embedding requests to avoid base64/float ambiguity and dimension mismatch issues with some providers/gateways.
|
package/README.md
CHANGED
|
@@ -698,6 +698,16 @@ LanceDB table `memories`:
|
|
|
698
698
|
|
|
699
699
|
---
|
|
700
700
|
|
|
701
|
+
## Troubleshooting
|
|
702
|
+
|
|
703
|
+
### "Cannot mix BigInt and other types" (LanceDB / Apache Arrow)
|
|
704
|
+
|
|
705
|
+
On LanceDB 0.26+ (via Apache Arrow), some numeric columns may be returned as `BigInt` at runtime (commonly: `timestamp`, `importance`, `_distance`, `_score`). If you see errors like:
|
|
706
|
+
|
|
707
|
+
- `TypeError: Cannot mix BigInt and other types, use explicit conversions`
|
|
708
|
+
|
|
709
|
+
upgrade to **memory-lancedb-pro >= 1.0.14**. This plugin now coerces these values using `Number(...)` before doing arithmetic (for example, when computing scores or sorting by timestamp).
|
|
710
|
+
|
|
701
711
|
## Dependencies
|
|
702
712
|
|
|
703
713
|
| Package | Purpose |
|
package/README_CN.md
CHANGED
|
@@ -573,6 +573,16 @@ LanceDB 表 `memories`:
|
|
|
573
573
|
|
|
574
574
|
---
|
|
575
575
|
|
|
576
|
+
## 常见问题 / 排错
|
|
577
|
+
|
|
578
|
+
### "Cannot mix BigInt and other types"(LanceDB / Apache Arrow)
|
|
579
|
+
|
|
580
|
+
在 LanceDB 0.26+(底层 Apache Arrow)中,部分数值列在运行时可能会以 `BigInt` 的形式返回(常见:`timestamp`、`importance`、`_distance`、`_score`)。如果你遇到类似报错:
|
|
581
|
+
|
|
582
|
+
- `TypeError: Cannot mix BigInt and other types, use explicit conversions`
|
|
583
|
+
|
|
584
|
+
请升级到 **memory-lancedb-pro >= 1.0.14**。插件已对这些字段统一做 `Number(...)` 转换后再参与运算(例如:计算分数、按时间排序)。
|
|
585
|
+
|
|
576
586
|
## 依赖
|
|
577
587
|
|
|
578
588
|
| 包 | 用途 |
|
package/index.ts
CHANGED
|
@@ -111,15 +111,16 @@ const MEMORY_TRIGGERS = [
|
|
|
111
111
|
/[\w.-]+@[\w.-]+\.\w+/,
|
|
112
112
|
/můj\s+\w+\s+je|je\s+můj/i,
|
|
113
113
|
/my\s+\w+\s+is|is\s+my/i,
|
|
114
|
-
/i (like|prefer|hate|love|want|need)/i,
|
|
114
|
+
/i (like|prefer|hate|love|want|need|care)/i,
|
|
115
115
|
/always|never|important/i,
|
|
116
|
-
// Chinese triggers
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
/我的\S
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
// Chinese triggers (Traditional & Simplified)
|
|
117
|
+
/記住|记住|記一下|记一下|別忘了|别忘了|備註|备注/,
|
|
118
|
+
/偏好|喜好|喜歡|喜欢|討厭|讨厌|不喜歡|不喜欢|愛用|爱用|習慣|习惯/,
|
|
119
|
+
/決定|决定|選擇了|选择了|改用|換成|换成|以後用|以后用/,
|
|
120
|
+
/我的\S+是|叫我|稱呼|称呼/,
|
|
121
|
+
/老是|講不聽|總是|总是|從不|从不|一直|每次都/,
|
|
122
|
+
/重要|關鍵|关键|注意|千萬別|千万别/,
|
|
123
|
+
/幫我|筆記|存檔|存起來|存一下|重點|原則|底線/,
|
|
123
124
|
];
|
|
124
125
|
|
|
125
126
|
export function shouldCapture(text: string): boolean {
|
|
@@ -151,16 +152,16 @@ export function shouldCapture(text: string): boolean {
|
|
|
151
152
|
|
|
152
153
|
export function detectCategory(text: string): "preference" | "fact" | "decision" | "entity" | "other" {
|
|
153
154
|
const lower = text.toLowerCase();
|
|
154
|
-
if (/prefer|radši|like|love|hate|want
|
|
155
|
+
if (/prefer|radši|like|love|hate|want|偏好|喜歡|喜欢|討厭|讨厌|不喜歡|不喜欢|愛用|爱用|習慣|习惯/i.test(lower)) {
|
|
155
156
|
return "preference";
|
|
156
157
|
}
|
|
157
|
-
if (/rozhodli|decided|will use|budeme
|
|
158
|
+
if (/rozhodli|decided|will use|budeme|決定|决定|選擇了|选择了|改用|換成|换成|以後用|以后用|規則|流程|SOP/i.test(lower)) {
|
|
158
159
|
return "decision";
|
|
159
160
|
}
|
|
160
|
-
if (/\+\d{10,}|@[\w.-]+\.\w+|is called|jmenuje se|我的\S
|
|
161
|
+
if (/\+\d{10,}|@[\w.-]+\.\w+|is called|jmenuje se|我的\S+是|叫我|稱呼|称呼/i.test(lower)) {
|
|
161
162
|
return "entity";
|
|
162
163
|
}
|
|
163
|
-
if (/\b(is|are|has|have|je|má|jsou)\b
|
|
164
|
+
if (/\b(is|are|has|have|je|má|jsou)\b|總是|总是|從不|从不|一直|每次都|老是/i.test(lower)) {
|
|
164
165
|
return "fact";
|
|
165
166
|
}
|
|
166
167
|
return "other";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memory-lancedb-pro",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "OpenClaw enhanced LanceDB memory plugin with hybrid retrieval (Vector + BM25), cross-encoder rerank, multi-scope isolation, and management CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|