openclaw-memory-alibaba-mysql 0.2.3 → 0.2.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.
- package/config.ts +3 -3
- package/db.ts +1 -1
- package/openclaw.plugin.json +2 -2
- package/package.json +1 -1
package/config.ts
CHANGED
|
@@ -59,7 +59,7 @@ export type { MemoryCategory };
|
|
|
59
59
|
const DEFAULT_MODEL = "text-embedding-v3";
|
|
60
60
|
const DEFAULT_BASE_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1";
|
|
61
61
|
const DEFAULT_TABLE_NAME = "openclaw_memories";
|
|
62
|
-
export const DEFAULT_CAPTURE_MAX_CHARS =
|
|
62
|
+
export const DEFAULT_CAPTURE_MAX_CHARS = 50000;
|
|
63
63
|
|
|
64
64
|
const EMBEDDING_DIMENSIONS: Record<string, number> = {
|
|
65
65
|
"text-embedding-v3": 1024,
|
|
@@ -242,8 +242,8 @@ export const memoryConfigSchema = {
|
|
|
242
242
|
|
|
243
243
|
const captureMaxChars =
|
|
244
244
|
typeof cfg.captureMaxChars === "number" ? Math.floor(cfg.captureMaxChars) : undefined;
|
|
245
|
-
if (typeof captureMaxChars === "number" && (captureMaxChars < 100 || captureMaxChars >
|
|
246
|
-
throw new Error("captureMaxChars must be between 100 and
|
|
245
|
+
if (typeof captureMaxChars === "number" && (captureMaxChars < 100 || captureMaxChars > 100_000)) {
|
|
246
|
+
throw new Error("captureMaxChars must be between 100 and 100000");
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
// --- Memory decay: only enableMemoryDecay is configurable; half-life and strategy use defaults ---
|
package/db.ts
CHANGED
|
@@ -72,7 +72,7 @@ export class MemoryDB {
|
|
|
72
72
|
agent_id VARCHAR(128) NOT NULL,
|
|
73
73
|
user_id VARCHAR(128) NULL DEFAULT NULL,
|
|
74
74
|
session_id VARCHAR(128) NULL DEFAULT NULL,
|
|
75
|
-
text
|
|
75
|
+
text LONGTEXT NOT NULL,
|
|
76
76
|
embedding VECTOR(${this.vectorDim}) NOT NULL,
|
|
77
77
|
importance FLOAT DEFAULT 0,
|
|
78
78
|
category VARCHAR(64) DEFAULT '${USER_MEMORY_FACT}',
|
package/openclaw.plugin.json
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"autoRecall": { "type": "boolean", "default": true },
|
|
68
68
|
"autoCapture": { "type": "boolean", "default": true },
|
|
69
|
-
"captureMaxChars": { "type": "number", "default":
|
|
69
|
+
"captureMaxChars": { "type": "number", "default": 50000 },
|
|
70
70
|
"enableMemoryDecay": {
|
|
71
71
|
"type": "boolean",
|
|
72
72
|
"default": false,
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
"captureMaxChars": {
|
|
177
177
|
"label": "Capture Max Chars",
|
|
178
178
|
"placeholder": "500",
|
|
179
|
-
"help": "Max length per captured memory (100–
|
|
179
|
+
"help": "Max length per captured memory (100–100000)"
|
|
180
180
|
},
|
|
181
181
|
"enableMemoryDecay": {
|
|
182
182
|
"label": "Enable Memory Decay",
|