@workglow/ai 0.2.5 → 0.2.6
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/browser.js +10 -5
- package/dist/browser.js.map +7 -7
- package/dist/bun.js +10 -5
- package/dist/bun.js.map +7 -7
- package/dist/node.js +10 -5
- package/dist/node.js.map +7 -7
- package/dist/task/DocumentEnricherTask.d.ts +7 -2
- package/dist/task/DocumentEnricherTask.d.ts.map +1 -1
- package/dist/task/HierarchicalChunkerTask.d.ts +7 -2
- package/dist/task/HierarchicalChunkerTask.d.ts.map +1 -1
- package/dist/task/RerankerTask.d.ts +0 -1
- package/dist/task/RerankerTask.d.ts.map +1 -1
- package/dist/task/StructuralParserTask.d.ts +8 -7
- package/dist/task/StructuralParserTask.d.ts.map +1 -1
- package/package.json +11 -11
package/dist/node.js
CHANGED
|
@@ -1144,7 +1144,7 @@ class AiTask extends Task {
|
|
|
1144
1144
|
if (modelTaskProperties.length > 0) {
|
|
1145
1145
|
const modelRepo = registry.get(MODEL_REPOSITORY);
|
|
1146
1146
|
const taskModels = await modelRepo.findModelsByTask(this.type) ?? [];
|
|
1147
|
-
for (const [key
|
|
1147
|
+
for (const [key] of modelTaskProperties) {
|
|
1148
1148
|
const requestedModel = input[key];
|
|
1149
1149
|
if (typeof requestedModel === "string") {
|
|
1150
1150
|
const found = taskModels?.find((m) => m.model_id === requestedModel);
|
|
@@ -3205,6 +3205,8 @@ var inputSchema7 = {
|
|
|
3205
3205
|
description: "The document ID"
|
|
3206
3206
|
},
|
|
3207
3207
|
documentTree: {
|
|
3208
|
+
type: "object",
|
|
3209
|
+
additionalProperties: true,
|
|
3208
3210
|
title: "Document Tree",
|
|
3209
3211
|
description: "The hierarchical document tree to enrich"
|
|
3210
3212
|
},
|
|
@@ -4207,6 +4209,8 @@ var inputSchema9 = {
|
|
|
4207
4209
|
description: "The ID of the document"
|
|
4208
4210
|
},
|
|
4209
4211
|
documentTree: {
|
|
4212
|
+
type: "object",
|
|
4213
|
+
additionalProperties: true,
|
|
4210
4214
|
title: "Document Tree",
|
|
4211
4215
|
description: "The hierarchical document tree to chunk"
|
|
4212
4216
|
},
|
|
@@ -5648,7 +5652,6 @@ class RerankerTask extends Task15 {
|
|
|
5648
5652
|
static title = "Reranker";
|
|
5649
5653
|
static description = "Rerank retrieved chunks to improve relevance";
|
|
5650
5654
|
static cacheable = true;
|
|
5651
|
-
resolvedCrossEncoderModel;
|
|
5652
5655
|
static inputSchema() {
|
|
5653
5656
|
return inputSchema12;
|
|
5654
5657
|
}
|
|
@@ -5820,8 +5823,10 @@ var outputSchema13 = {
|
|
|
5820
5823
|
description: "Generated or provided document ID"
|
|
5821
5824
|
},
|
|
5822
5825
|
documentTree: {
|
|
5826
|
+
type: "object",
|
|
5823
5827
|
title: "Document Tree",
|
|
5824
|
-
description: "Parsed hierarchical document tree"
|
|
5828
|
+
description: "Parsed hierarchical document tree",
|
|
5829
|
+
additionalProperties: true
|
|
5825
5830
|
},
|
|
5826
5831
|
nodeCount: {
|
|
5827
5832
|
type: "number",
|
|
@@ -5847,7 +5852,7 @@ class StructuralParserTask extends Task16 {
|
|
|
5847
5852
|
}
|
|
5848
5853
|
async execute(input, context) {
|
|
5849
5854
|
const { text, title, format = "auto", sourceUri, doc_id: providedDocId } = input;
|
|
5850
|
-
const doc_id = providedDocId || uuid42();
|
|
5855
|
+
const doc_id = providedDocId || sourceUri || uuid42();
|
|
5851
5856
|
let documentTree;
|
|
5852
5857
|
if (format === "markdown") {
|
|
5853
5858
|
documentTree = await StructuralParser.parseMarkdown(doc_id, text, title);
|
|
@@ -7663,4 +7668,4 @@ export {
|
|
|
7663
7668
|
AgentInputSchema
|
|
7664
7669
|
};
|
|
7665
7670
|
|
|
7666
|
-
//# debugId=
|
|
7671
|
+
//# debugId=E87783958D33A7FE64756E2164756E21
|