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