@mastra/libsql 1.25.2-alpha.0 → 1.25.2-alpha.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/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-rag-retrieval.md +7 -5
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts +2 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/docs/SKILL.md
CHANGED
|
@@ -50,23 +50,25 @@ console.log(results)
|
|
|
50
50
|
|
|
51
51
|
The `topK` parameter specifies the maximum number of most similar results to return from the vector search.
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Each result includes an `id`, a similarity `score`, and the stored `metadata`. When you store chunk text in metadata, it's available as `metadata.text`:
|
|
54
54
|
|
|
55
55
|
```ts
|
|
56
56
|
[
|
|
57
57
|
{
|
|
58
|
-
|
|
58
|
+
id: 'chunk-1',
|
|
59
59
|
score: 0.89,
|
|
60
|
-
metadata: { source: 'article1.txt' },
|
|
60
|
+
metadata: { text: 'Climate change poses significant challenges...', source: 'article1.txt' },
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
|
-
|
|
63
|
+
id: 'chunk-2',
|
|
64
64
|
score: 0.82,
|
|
65
|
-
metadata: { source: 'article1.txt' },
|
|
65
|
+
metadata: { text: 'Rising temperatures affect crop yields...', source: 'article1.txt' },
|
|
66
66
|
},
|
|
67
67
|
]
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
+
Results can also include `vector` when you set `includeVector: true`, and `document` when the store returns the original document (Chroma only).
|
|
71
|
+
|
|
70
72
|
## Advanced retrieval options
|
|
71
73
|
|
|
72
74
|
### Metadata Filtering
|
package/dist/index.cjs
CHANGED
|
@@ -13460,7 +13460,7 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends _mastra_core_storage.Workflo
|
|
|
13460
13460
|
this.logger.warn("LibSQL Workflows: Failed to set PRAGMA settings.", err);
|
|
13461
13461
|
}
|
|
13462
13462
|
}
|
|
13463
|
-
async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext }) {
|
|
13463
|
+
async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, state }) {
|
|
13464
13464
|
return this.executeWithRetry(() => withClientWriteLock(this.#client, async () => {
|
|
13465
13465
|
const tx = await this.#client.transaction("write");
|
|
13466
13466
|
try {
|
|
@@ -13491,7 +13491,8 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends _mastra_core_storage.Workflo
|
|
|
13491
13491
|
snapshot,
|
|
13492
13492
|
stepId,
|
|
13493
13493
|
result,
|
|
13494
|
-
requestContext
|
|
13494
|
+
requestContext,
|
|
13495
|
+
state
|
|
13495
13496
|
});
|
|
13496
13497
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
13497
13498
|
await tx.execute({
|