mr-memory 2.3.0 → 2.3.1
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/index.ts +2 -6
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -186,8 +186,6 @@ const memoryRouterPlugin = {
|
|
|
186
186
|
}
|
|
187
187
|
contextPayload.push({ role: "user", content: prompt });
|
|
188
188
|
|
|
189
|
-
const densityMap: Record<string, number> = { low: 40, high: 80, xhigh: 160 };
|
|
190
|
-
const contextLimit = densityMap[density] || 80;
|
|
191
189
|
|
|
192
190
|
const res = await fetch(`${endpoint}/v1/memory/prepare`, {
|
|
193
191
|
method: "POST",
|
|
@@ -198,7 +196,7 @@ const memoryRouterPlugin = {
|
|
|
198
196
|
body: JSON.stringify({
|
|
199
197
|
messages: contextPayload,
|
|
200
198
|
density,
|
|
201
|
-
|
|
199
|
+
|
|
202
200
|
}),
|
|
203
201
|
});
|
|
204
202
|
|
|
@@ -283,8 +281,6 @@ const memoryRouterPlugin = {
|
|
|
283
281
|
contextPayload.push({ role: "user", content: prompt });
|
|
284
282
|
|
|
285
283
|
// 4. Call /v1/memory/prepare
|
|
286
|
-
const densityMap: Record<string, number> = { low: 40, high: 80, xhigh: 160 };
|
|
287
|
-
const contextLimit = densityMap[density] || 80;
|
|
288
284
|
|
|
289
285
|
const res = await fetch(`${endpoint}/v1/memory/prepare`, {
|
|
290
286
|
method: "POST",
|
|
@@ -295,7 +291,7 @@ const memoryRouterPlugin = {
|
|
|
295
291
|
body: JSON.stringify({
|
|
296
292
|
messages: contextPayload,
|
|
297
293
|
density,
|
|
298
|
-
|
|
294
|
+
|
|
299
295
|
}),
|
|
300
296
|
});
|
|
301
297
|
|