@mastra/upstash 1.5.5-alpha.1 → 1.5.5
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/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-vectors-upstash.md +8 -4
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/docs/SKILL.md
CHANGED
|
@@ -18,13 +18,13 @@ The UpstashVector class provides vector search using [Upstash Vector](https://up
|
|
|
18
18
|
|
|
19
19
|
### `createIndex()`
|
|
20
20
|
|
|
21
|
-
Note: This method is a no-op for Upstash
|
|
21
|
+
Note: This method is a no-op for Upstash. Indexes (Upstash namespaces) are created automatically on first write, and the parameters below are ignored.
|
|
22
22
|
|
|
23
23
|
**indexName** (`string`): Name of the index to create
|
|
24
24
|
|
|
25
25
|
**dimension** (`number`): Vector dimension (must match your embedding model)
|
|
26
26
|
|
|
27
|
-
**metric** (`'cosine' | 'euclidean' | 'dotproduct'`):
|
|
27
|
+
**metric** (`'cosine' | 'euclidean' | 'dotproduct'`): Ignored. The metric is set on the Upstash index itself.
|
|
28
28
|
|
|
29
29
|
### `upsert()`
|
|
30
30
|
|
|
@@ -70,7 +70,7 @@ Returns:
|
|
|
70
70
|
interface IndexStats {
|
|
71
71
|
dimension: number
|
|
72
72
|
count: number
|
|
73
|
-
metric
|
|
73
|
+
metric?: 'cosine' | 'euclidean' | 'dotproduct'
|
|
74
74
|
}
|
|
75
75
|
```
|
|
76
76
|
|
|
@@ -82,10 +82,14 @@ interface IndexStats {
|
|
|
82
82
|
|
|
83
83
|
**indexName** (`string`): Name of the index to update
|
|
84
84
|
|
|
85
|
-
**id** (`string`): ID of the item to update
|
|
85
|
+
**id** (`string`): ID of the item to update. Mutually exclusive with filter.
|
|
86
|
+
|
|
87
|
+
**filter** (`Record<string, any>`): Metadata filter matching up to 1,000 items to update. Mutually exclusive with id. Must not be empty.
|
|
86
88
|
|
|
87
89
|
**update** (`object`): Update object containing vector, sparse vector, and/or metadata
|
|
88
90
|
|
|
91
|
+
Provide exactly one of `id` or `filter`.
|
|
92
|
+
|
|
89
93
|
The `update` object can have the following properties:
|
|
90
94
|
|
|
91
95
|
- `vector` (optional): An array of numbers representing the new dense vector.
|
package/dist/index.cjs
CHANGED
|
@@ -1488,7 +1488,7 @@ var StoreMemoryUpstash = class extends _mastra_core_storage.MemoryStorage {
|
|
|
1488
1488
|
const aValue = new Date(a[field]).getTime();
|
|
1489
1489
|
const bValue = new Date(b[field]).getTime();
|
|
1490
1490
|
if (direction === "ASC") return aValue - bValue;
|
|
1491
|
-
|
|
1491
|
+
return bValue - aValue;
|
|
1492
1492
|
});
|
|
1493
1493
|
}
|
|
1494
1494
|
async cloneThread(args) {
|