@mastra/upstash 1.5.0 → 1.5.1-alpha.0
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/index.cjs +1 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/vector/index.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import { BackgroundTasksStorage, MastraCompositeStore, MemoryStorage, ScoresStor
|
|
|
4
4
|
import { ErrorCategory, ErrorDomain, MastraError } from "@mastra/core/error";
|
|
5
5
|
import { MessageList } from "@mastra/core/agent";
|
|
6
6
|
import { saveScorePayloadSchema } from "@mastra/core/evals";
|
|
7
|
-
import { randomUUID } from "crypto";
|
|
8
7
|
import { MastraVector } from "@mastra/core/vector";
|
|
9
8
|
import { Index } from "@upstash/vector";
|
|
10
9
|
import { BaseFilterTranslator } from "@mastra/core/vector/filter";
|
|
@@ -2239,7 +2238,7 @@ var UpstashVector = class extends MastraVector {
|
|
|
2239
2238
|
* @returns {Promise<string[]>} A promise that resolves to the IDs of the upserted vectors.
|
|
2240
2239
|
*/
|
|
2241
2240
|
async upsert({ indexName: namespace, vectors, metadata, ids, sparseVectors }) {
|
|
2242
|
-
const generatedIds = ids || vectors.map(() => randomUUID());
|
|
2241
|
+
const generatedIds = ids || vectors.map(() => globalThis.crypto.randomUUID());
|
|
2243
2242
|
const points = vectors.map((vector, index) => ({
|
|
2244
2243
|
id: generatedIds[index],
|
|
2245
2244
|
vector,
|