@mastra/rag 2.6.5-alpha.2 → 2.6.6-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
CHANGED
|
@@ -127,7 +127,7 @@ Throws if the snapshot version is unsupported, if a node embedding doesn't match
|
|
|
127
127
|
|
|
128
128
|
## Persisting a graph
|
|
129
129
|
|
|
130
|
-
Building a graph is O(n²) in the number of chunks, so rebuilding it on every process start is wasteful. Serialize the graph once and store the snapshot wherever you already keep state. A snapshot is plain JSON
|
|
130
|
+
Building a graph is O(n²) in the number of chunks, so rebuilding it on every process start is wasteful. Serialize the graph once and store the snapshot wherever you already keep state. A snapshot is plain JSON. Any store works (a file, a blob column, a key-value cache), and `GraphRAG` doesn't depend on a storage backend.
|
|
131
131
|
|
|
132
132
|
```typescript
|
|
133
133
|
import { readFile, writeFile } from 'node:fs/promises'
|
package/dist/index.cjs
CHANGED
|
@@ -246,7 +246,7 @@ var BaseNode = class {
|
|
|
246
246
|
__publicField(this, "relationships");
|
|
247
247
|
__privateAdd(this, _hash, __runInitializers(_init, 8, this, "")), __runInitializers(_init, 11, this);
|
|
248
248
|
const { id_, metadata, relationships } = init || {};
|
|
249
|
-
this.id_ = id_ ??
|
|
249
|
+
this.id_ = id_ ?? globalThis.crypto.randomUUID();
|
|
250
250
|
this.metadata = metadata ?? {};
|
|
251
251
|
this.relationships = relationships ?? {};
|
|
252
252
|
}
|