@workglow/ai 0.0.126 → 0.1.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/README.md +214 -47
- package/dist/browser.js +562 -1274
- package/dist/browser.js.map +55 -60
- package/dist/bun.js +562 -1274
- package/dist/bun.js.map +55 -60
- package/dist/common.d.ts +3 -1
- package/dist/common.d.ts.map +1 -1
- package/dist/execution/DirectExecutionStrategy.d.ts +20 -0
- package/dist/execution/DirectExecutionStrategy.d.ts.map +1 -0
- package/dist/execution/IAiExecutionStrategy.d.ts +33 -0
- package/dist/execution/IAiExecutionStrategy.d.ts.map +1 -0
- package/dist/execution/QueuedExecutionStrategy.d.ts +50 -0
- package/dist/execution/QueuedExecutionStrategy.d.ts.map +1 -0
- package/dist/job/AiJob.d.ts +6 -0
- package/dist/job/AiJob.d.ts.map +1 -1
- package/dist/node.js +562 -1274
- package/dist/node.js.map +55 -60
- package/dist/provider/AiProvider.d.ts +16 -2
- package/dist/provider/AiProvider.d.ts.map +1 -1
- package/dist/provider/AiProviderRegistry.d.ts +20 -0
- package/dist/provider/AiProviderRegistry.d.ts.map +1 -1
- package/dist/provider/QueuedAiProvider.d.ts +23 -2
- package/dist/provider/QueuedAiProvider.d.ts.map +1 -1
- package/dist/task/BackgroundRemovalTask.d.ts +3 -3
- package/dist/task/BackgroundRemovalTask.d.ts.map +1 -1
- package/dist/task/ChunkRetrievalTask.d.ts +4 -4
- package/dist/task/ChunkRetrievalTask.d.ts.map +1 -1
- package/dist/task/ChunkToVectorTask.d.ts +4 -4
- package/dist/task/ChunkToVectorTask.d.ts.map +1 -1
- package/dist/task/ChunkVectorHybridSearchTask.d.ts +4 -4
- package/dist/task/ChunkVectorHybridSearchTask.d.ts.map +1 -1
- package/dist/task/ChunkVectorSearchTask.d.ts +4 -4
- package/dist/task/ChunkVectorSearchTask.d.ts.map +1 -1
- package/dist/task/ChunkVectorUpsertTask.d.ts +4 -4
- package/dist/task/ChunkVectorUpsertTask.d.ts.map +1 -1
- package/dist/task/ContextBuilderTask.d.ts +4 -4
- package/dist/task/ContextBuilderTask.d.ts.map +1 -1
- package/dist/task/CountTokensTask.d.ts +11 -29
- package/dist/task/CountTokensTask.d.ts.map +1 -1
- package/dist/task/DocumentEnricherTask.d.ts +4 -4
- package/dist/task/DocumentEnricherTask.d.ts.map +1 -1
- package/dist/task/DownloadModelTask.d.ts +5 -5
- package/dist/task/DownloadModelTask.d.ts.map +1 -1
- package/dist/task/FaceDetectorTask.d.ts +4 -4
- package/dist/task/FaceDetectorTask.d.ts.map +1 -1
- package/dist/task/FaceLandmarkerTask.d.ts +4 -4
- package/dist/task/FaceLandmarkerTask.d.ts.map +1 -1
- package/dist/task/GestureRecognizerTask.d.ts +4 -4
- package/dist/task/GestureRecognizerTask.d.ts.map +1 -1
- package/dist/task/HandLandmarkerTask.d.ts +4 -4
- package/dist/task/HandLandmarkerTask.d.ts.map +1 -1
- package/dist/task/HierarchicalChunkerTask.d.ts +4 -4
- package/dist/task/HierarchicalChunkerTask.d.ts.map +1 -1
- package/dist/task/HierarchyJoinTask.d.ts +4 -4
- package/dist/task/HierarchyJoinTask.d.ts.map +1 -1
- package/dist/task/ImageClassificationTask.d.ts +4 -4
- package/dist/task/ImageClassificationTask.d.ts.map +1 -1
- package/dist/task/ImageEmbeddingTask.d.ts +203 -89
- package/dist/task/ImageEmbeddingTask.d.ts.map +1 -1
- package/dist/task/ImageSegmentationTask.d.ts +4 -4
- package/dist/task/ImageSegmentationTask.d.ts.map +1 -1
- package/dist/task/ImageToTextTask.d.ts +4 -4
- package/dist/task/ImageToTextTask.d.ts.map +1 -1
- package/dist/task/ModelInfoTask.d.ts +5 -5
- package/dist/task/ModelInfoTask.d.ts.map +1 -1
- package/dist/task/ObjectDetectionTask.d.ts +4 -4
- package/dist/task/ObjectDetectionTask.d.ts.map +1 -1
- package/dist/task/PoseLandmarkerTask.d.ts +4 -4
- package/dist/task/PoseLandmarkerTask.d.ts.map +1 -1
- package/dist/task/QueryExpanderTask.d.ts +4 -4
- package/dist/task/QueryExpanderTask.d.ts.map +1 -1
- package/dist/task/RerankerTask.d.ts +4 -4
- package/dist/task/RerankerTask.d.ts.map +1 -1
- package/dist/task/StructuralParserTask.d.ts +4 -4
- package/dist/task/StructuralParserTask.d.ts.map +1 -1
- package/dist/task/StructuredGenerationTask.d.ts +4 -4
- package/dist/task/StructuredGenerationTask.d.ts.map +1 -1
- package/dist/task/TextChunkerTask.d.ts +4 -4
- package/dist/task/TextChunkerTask.d.ts.map +1 -1
- package/dist/task/TextClassificationTask.d.ts +24 -62
- package/dist/task/TextClassificationTask.d.ts.map +1 -1
- package/dist/task/TextEmbeddingTask.d.ts +3 -3
- package/dist/task/TextEmbeddingTask.d.ts.map +1 -1
- package/dist/task/TextFillMaskTask.d.ts +29 -73
- package/dist/task/TextFillMaskTask.d.ts.map +1 -1
- package/dist/task/TextGenerationTask.d.ts +13 -32
- package/dist/task/TextGenerationTask.d.ts.map +1 -1
- package/dist/task/TextLanguageDetectionTask.d.ts +24 -62
- package/dist/task/TextLanguageDetectionTask.d.ts.map +1 -1
- package/dist/task/TextNamedEntityRecognitionTask.d.ts +29 -73
- package/dist/task/TextNamedEntityRecognitionTask.d.ts.map +1 -1
- package/dist/task/TextQuestionAnswerTask.d.ts +17 -45
- package/dist/task/TextQuestionAnswerTask.d.ts.map +1 -1
- package/dist/task/TextRewriterTask.d.ts +12 -31
- package/dist/task/TextRewriterTask.d.ts.map +1 -1
- package/dist/task/TextSummaryTask.d.ts +12 -31
- package/dist/task/TextSummaryTask.d.ts.map +1 -1
- package/dist/task/TextTranslationTask.d.ts +12 -31
- package/dist/task/TextTranslationTask.d.ts.map +1 -1
- package/dist/task/TopicSegmenterTask.d.ts +4 -4
- package/dist/task/TopicSegmenterTask.d.ts.map +1 -1
- package/dist/task/UnloadModelTask.d.ts +4 -4
- package/dist/task/UnloadModelTask.d.ts.map +1 -1
- package/dist/task/VectorQuantizeTask.d.ts +4 -4
- package/dist/task/VectorQuantizeTask.d.ts.map +1 -1
- package/dist/task/VectorSimilarityTask.d.ts +4 -4
- package/dist/task/VectorSimilarityTask.d.ts.map +1 -1
- package/dist/task/base/AiTask.d.ts +12 -31
- package/dist/task/base/AiTask.d.ts.map +1 -1
- package/dist/task/base/AiVisionTask.d.ts +7 -12
- package/dist/task/base/AiVisionTask.d.ts.map +1 -1
- package/dist/task/base/StreamingAiTask.d.ts +7 -4
- package/dist/task/base/StreamingAiTask.d.ts.map +1 -1
- package/dist/task/index.d.ts +1 -13
- package/dist/task/index.d.ts.map +1 -1
- package/dist/worker.d.ts +0 -2
- package/dist/worker.d.ts.map +1 -1
- package/dist/worker.js +217 -233
- package/dist/worker.js.map +7 -7
- package/package.json +11 -11
- package/dist/queue/createDefaultQueue.d.ts +0 -17
- package/dist/queue/createDefaultQueue.d.ts.map +0 -1
- package/dist/task/AgentTask.d.ts +0 -524
- package/dist/task/AgentTask.d.ts.map +0 -1
- package/dist/task/AgentTypes.d.ts +0 -181
- package/dist/task/AgentTypes.d.ts.map +0 -1
- package/dist/task/AgentUtils.d.ts +0 -50
- package/dist/task/AgentUtils.d.ts.map +0 -1
- package/dist/task/MessageConversion.d.ts +0 -52
- package/dist/task/MessageConversion.d.ts.map +0 -1
- package/dist/task/ToolCallingTask.d.ts +0 -385
- package/dist/task/ToolCallingTask.d.ts.map +0 -1
- package/dist/task/ToolCallingUtils.d.ts +0 -65
- package/dist/task/ToolCallingUtils.d.ts.map +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { CreateWorkflow, IExecuteContext,
|
|
6
|
+
import { CreateWorkflow, IExecuteContext, TaskConfig, Task } from "@workglow/task-graph";
|
|
7
7
|
import { DataPortSchema, FromSchema } from "@workglow/util/schema";
|
|
8
8
|
declare const inputSchema: {
|
|
9
9
|
readonly type: "object";
|
|
@@ -177,7 +177,7 @@ export type RerankerTaskOutput = FromSchema<typeof outputSchema>;
|
|
|
177
177
|
* Note: Cross-encoder reranking requires a model to be loaded.
|
|
178
178
|
* For now, this implements simple heuristic-based reranking.
|
|
179
179
|
*/
|
|
180
|
-
export declare class RerankerTask extends Task<RerankerTaskInput, RerankerTaskOutput,
|
|
180
|
+
export declare class RerankerTask extends Task<RerankerTaskInput, RerankerTaskOutput, TaskConfig> {
|
|
181
181
|
static type: string;
|
|
182
182
|
static category: string;
|
|
183
183
|
static title: string;
|
|
@@ -223,7 +223,7 @@ export declare const reranker: (input: {
|
|
|
223
223
|
query: string;
|
|
224
224
|
scores?: number[] | undefined;
|
|
225
225
|
topK?: number | undefined;
|
|
226
|
-
}, config?:
|
|
226
|
+
}, config?: TaskConfig | undefined) => Promise<{
|
|
227
227
|
chunks: string[];
|
|
228
228
|
count: number;
|
|
229
229
|
metadata?: {
|
|
@@ -234,7 +234,7 @@ export declare const reranker: (input: {
|
|
|
234
234
|
}>;
|
|
235
235
|
declare module "@workglow/task-graph" {
|
|
236
236
|
interface Workflow {
|
|
237
|
-
reranker: CreateWorkflow<RerankerTaskInput, RerankerTaskOutput,
|
|
237
|
+
reranker: CreateWorkflow<RerankerTaskInput, RerankerTaskOutput, TaskConfig>;
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RerankerTask.d.ts","sourceRoot":"","sources":["../../src/task/RerankerTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"RerankerTask.d.ts","sourceRoot":"","sources":["../../src/task/RerankerTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAY,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAMnE,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDkB,CAAC;AAEpC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCiB,CAAC;AAEpC,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAC/D,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AASjE;;;;;;GAMG;AACH,qBAAa,YAAa,SAAQ,IAAI,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,UAAU,CAAC;IACvF,OAAc,IAAI,SAAkB;IACpC,OAAc,QAAQ,SAAS;IAC/B,OAAc,KAAK,SAAc;IACjC,OAAc,WAAW,SAAkD;IAC3E,OAAc,SAAS,UAAQ;IAC/B,OAAO,CAAC,yBAAyB,CAAC,CAAgB;IAElD,OAAc,WAAW,IAAI,cAAc,CAE1C;IAED,OAAc,YAAY,IAAI,cAAc,CAE3C;IAEK,OAAO,CAAC,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA0C7F;YAEa,kBAAkB;IAyChC,OAAO,CAAC,wBAAwB;IAqBhC;;OAEG;IACH,OAAO,CAAC,YAAY;IAuDpB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;CAqB7B;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEpB,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,QAAQ,EAAE,cAAc,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,UAAU,CAAC,CAAC;KAC7E;CACF"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { CreateWorkflow, IExecuteContext,
|
|
6
|
+
import { CreateWorkflow, IExecuteContext, TaskConfig, Task } from "@workglow/task-graph";
|
|
7
7
|
import { DataPortSchema, FromSchema } from "@workglow/util/schema";
|
|
8
8
|
declare const inputSchema: {
|
|
9
9
|
readonly type: "object";
|
|
@@ -66,7 +66,7 @@ export type StructuralParserTaskOutput = FromSchema<typeof outputSchema>;
|
|
|
66
66
|
* Task for parsing documents into hierarchical tree structure
|
|
67
67
|
* Supports markdown and plain text with automatic format detection
|
|
68
68
|
*/
|
|
69
|
-
export declare class StructuralParserTask extends Task<StructuralParserTaskInput, StructuralParserTaskOutput,
|
|
69
|
+
export declare class StructuralParserTask extends Task<StructuralParserTaskInput, StructuralParserTaskOutput, TaskConfig> {
|
|
70
70
|
static type: string;
|
|
71
71
|
static category: string;
|
|
72
72
|
static title: string;
|
|
@@ -83,14 +83,14 @@ export declare const structuralParser: (input: {
|
|
|
83
83
|
sourceUri?: string | undefined;
|
|
84
84
|
text: string;
|
|
85
85
|
title: string;
|
|
86
|
-
}, config?:
|
|
86
|
+
}, config?: TaskConfig | undefined) => Promise<{
|
|
87
87
|
doc_id: string;
|
|
88
88
|
documentTree: unknown;
|
|
89
89
|
nodeCount: number;
|
|
90
90
|
}>;
|
|
91
91
|
declare module "@workglow/task-graph" {
|
|
92
92
|
interface Workflow {
|
|
93
|
-
structuralParser: CreateWorkflow<StructuralParserTaskInput, StructuralParserTaskOutput,
|
|
93
|
+
structuralParser: CreateWorkflow<StructuralParserTaskInput, StructuralParserTaskOutput, TaskConfig>;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StructuralParserTask.d.ts","sourceRoot":"","sources":["../../src/task/StructuralParserTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"StructuralParserTask.d.ts","sourceRoot":"","sources":["../../src/task/StructuralParserTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAY,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnE,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCkB,CAAC;AAEpC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;CAoBiB,CAAC;AAEpC,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AACvE,MAAM,MAAM,0BAA0B,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAEzE;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,IAAI,CAC5C,yBAAyB,EACzB,0BAA0B,EAC1B,UAAU,CACX;IACC,OAAc,IAAI,SAA0B;IAC5C,OAAc,QAAQ,SAAc;IACpC,OAAc,KAAK,SAAuB;IAC1C,OAAc,WAAW,SAAsD;IAC/E,OAAc,SAAS,UAAQ;IAE/B,OAAc,WAAW,IAAI,cAAc,CAE1C;IAED,OAAc,YAAY,IAAI,cAAc,CAE3C;IAEK,OAAO,CACX,KAAK,EAAE,yBAAyB,EAChC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,0BAA0B,CAAC,CAyBrC;IAED,OAAO,CAAC,UAAU;CASnB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;EAE5B,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,gBAAgB,EAAE,cAAc,CAC9B,yBAAyB,EACzB,0BAA0B,EAC1B,UAAU,CACX,CAAC;KACH;CACF"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { CreateWorkflow,
|
|
6
|
+
import { CreateWorkflow, TaskConfig } from "@workglow/task-graph";
|
|
7
7
|
import { DataPortSchema, FromSchema } from "@workglow/util/schema";
|
|
8
8
|
import { StreamingAiTask } from "./base/StreamingAiTask";
|
|
9
9
|
export declare const StructuredGenerationInputSchema: {
|
|
@@ -114,7 +114,7 @@ export declare const StructuredGenerationOutputSchema: {
|
|
|
114
114
|
};
|
|
115
115
|
export type StructuredGenerationTaskInput = FromSchema<typeof StructuredGenerationInputSchema>;
|
|
116
116
|
export type StructuredGenerationTaskOutput = FromSchema<typeof StructuredGenerationOutputSchema>;
|
|
117
|
-
export declare class StructuredGenerationTask extends StreamingAiTask<StructuredGenerationTaskInput, StructuredGenerationTaskOutput,
|
|
117
|
+
export declare class StructuredGenerationTask extends StreamingAiTask<StructuredGenerationTaskInput, StructuredGenerationTaskOutput, TaskConfig> {
|
|
118
118
|
static type: string;
|
|
119
119
|
static category: string;
|
|
120
120
|
static title: string;
|
|
@@ -147,14 +147,14 @@ export declare const structuredGeneration: (input: {
|
|
|
147
147
|
};
|
|
148
148
|
prompt: string;
|
|
149
149
|
temperature?: number | undefined;
|
|
150
|
-
}, config?:
|
|
150
|
+
}, config?: TaskConfig | undefined) => Promise<{
|
|
151
151
|
object: {
|
|
152
152
|
[x: string]: unknown;
|
|
153
153
|
};
|
|
154
154
|
}>;
|
|
155
155
|
declare module "@workglow/task-graph" {
|
|
156
156
|
interface Workflow {
|
|
157
|
-
structuredGeneration: CreateWorkflow<StructuredGenerationTaskInput, StructuredGenerationTaskOutput,
|
|
157
|
+
structuredGeneration: CreateWorkflow<StructuredGenerationTaskInput, StructuredGenerationTaskOutput, TaskConfig>;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
//# sourceMappingURL=StructuredGenerationTask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StructuredGenerationTask.d.ts","sourceRoot":"","sources":["../../src/task/StructuredGenerationTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"StructuredGenerationTask.d.ts","sourceRoot":"","sources":["../../src/task/StructuredGenerationTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,UAAU,EAAY,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCT,CAAC;AAEpC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;CAcV,CAAC;AAEpC,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAC/F,MAAM,MAAM,8BAA8B,GAAG,UAAU,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAEjG,qBAAa,wBAAyB,SAAQ,eAAe,CAC3D,6BAA6B,EAC7B,8BAA8B,EAC9B,UAAU,CACX;IACC,OAAc,IAAI,SAA8B;IAChD,OAAc,QAAQ,SAAmB;IACzC,OAAc,KAAK,SAA2B;IAC9C,OAAc,WAAW,SACkE;IAC3F,OAAc,WAAW,IAAI,cAAc,CAE1C;IACD,OAAc,YAAY,IAAI,cAAc,CAE3C;CACF;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;EAEhC,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,oBAAoB,EAAE,cAAc,CAClC,6BAA6B,EAC7B,8BAA8B,EAC9B,UAAU,CACX,CAAC;KACH;CACF"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { CreateWorkflow, IExecuteContext,
|
|
6
|
+
import { CreateWorkflow, IExecuteContext, TaskConfig, Task } from "@workglow/task-graph";
|
|
7
7
|
import { DataPortSchema, FromSchema } from "@workglow/util/schema";
|
|
8
8
|
export declare const ChunkingStrategy: {
|
|
9
9
|
readonly FIXED: "fixed";
|
|
@@ -89,7 +89,7 @@ export type TextChunkerTaskOutput = FromSchema<typeof outputSchema>;
|
|
|
89
89
|
* Task for chunking text into smaller segments with configurable strategies.
|
|
90
90
|
* Supports fixed-size, sentence-based, paragraph-based, and semantic chunking.
|
|
91
91
|
*/
|
|
92
|
-
export declare class TextChunkerTask extends Task<TextChunkerTaskInput, TextChunkerTaskOutput,
|
|
92
|
+
export declare class TextChunkerTask extends Task<TextChunkerTaskInput, TextChunkerTaskOutput, TaskConfig> {
|
|
93
93
|
static type: string;
|
|
94
94
|
static category: string;
|
|
95
95
|
static title: string;
|
|
@@ -116,7 +116,7 @@ export declare const textChunker: (input: {
|
|
|
116
116
|
chunkSize?: number | undefined;
|
|
117
117
|
strategy?: "fixed" | "paragraph" | "semantic" | "sentence" | undefined;
|
|
118
118
|
text: string;
|
|
119
|
-
}, config?:
|
|
119
|
+
}, config?: TaskConfig | undefined) => Promise<{
|
|
120
120
|
chunks: string[];
|
|
121
121
|
metadata: {
|
|
122
122
|
endChar?: number | undefined;
|
|
@@ -127,7 +127,7 @@ export declare const textChunker: (input: {
|
|
|
127
127
|
}>;
|
|
128
128
|
declare module "@workglow/task-graph" {
|
|
129
129
|
interface Workflow {
|
|
130
|
-
textChunker: CreateWorkflow<TextChunkerTaskInput, TextChunkerTaskOutput,
|
|
130
|
+
textChunker: CreateWorkflow<TextChunkerTaskInput, TextChunkerTaskOutput, TaskConfig>;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextChunkerTask.d.ts","sourceRoot":"","sources":["../../src/task/TextChunkerTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"TextChunkerTask.d.ts","sourceRoot":"","sources":["../../src/task/TextChunkerTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAY,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnE,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAExF,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCkB,CAAC;AAEpC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BiB,CAAC;AAEpC,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClE,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AASpE;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,UAAU,CAAC;IAChG,OAAc,IAAI,SAAqB;IACvC,OAAc,QAAQ,SAAc;IACpC,OAAc,KAAK,SAAkB;IACrC,OAAc,WAAW,SACyD;IAClF,OAAc,SAAS,UAAQ;IAE/B,OAAc,WAAW,IAAI,cAAc,CAE1C;IAED,OAAc,YAAY,IAAI,cAAc,CAE3C;IAEK,OAAO,CACX,KAAK,EAAE,oBAAoB,EAC3B,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,qBAAqB,CAAC,CAyBhC;IAED;;OAEG;IACH,OAAO,CAAC,UAAU;IA8BlB;;OAEG;IACH,OAAO,CAAC,eAAe;IAoFvB;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAoEzB;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;EAEvB,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,WAAW,EAAE,cAAc,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,UAAU,CAAC,CAAC;KACtF;CACF"}
|
|
@@ -3,25 +3,16 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { CreateWorkflow,
|
|
6
|
+
import { CreateWorkflow, TaskConfig } from "@workglow/task-graph";
|
|
7
7
|
import { DataPortSchema, FromSchema } from "@workglow/util/schema";
|
|
8
8
|
import { AiTask } from "./base/AiTask";
|
|
9
9
|
export declare const TextClassificationInputSchema: {
|
|
10
10
|
readonly type: "object";
|
|
11
11
|
readonly properties: {
|
|
12
12
|
readonly text: {
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readonly description: "The text to classify";
|
|
17
|
-
}, {
|
|
18
|
-
readonly type: "array";
|
|
19
|
-
readonly items: {
|
|
20
|
-
readonly type: "string";
|
|
21
|
-
readonly title: "Text";
|
|
22
|
-
readonly description: "The text to classify";
|
|
23
|
-
};
|
|
24
|
-
}];
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly title: "Text";
|
|
15
|
+
readonly description: "The text to classify";
|
|
25
16
|
};
|
|
26
17
|
readonly candidateLabels: {
|
|
27
18
|
readonly type: "array";
|
|
@@ -106,52 +97,26 @@ export declare const TextClassificationOutputSchema: {
|
|
|
106
97
|
readonly type: "object";
|
|
107
98
|
readonly properties: {
|
|
108
99
|
readonly categories: {
|
|
109
|
-
readonly
|
|
110
|
-
|
|
111
|
-
readonly
|
|
112
|
-
|
|
113
|
-
readonly
|
|
114
|
-
readonly
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
readonly description: "The name of the category";
|
|
118
|
-
};
|
|
119
|
-
readonly score: {
|
|
120
|
-
readonly type: "number";
|
|
121
|
-
readonly title: "Score";
|
|
122
|
-
readonly description: "The confidence score for this category";
|
|
123
|
-
};
|
|
100
|
+
readonly type: "array";
|
|
101
|
+
readonly items: {
|
|
102
|
+
readonly type: "object";
|
|
103
|
+
readonly properties: {
|
|
104
|
+
readonly label: {
|
|
105
|
+
readonly type: "string";
|
|
106
|
+
readonly title: "Label";
|
|
107
|
+
readonly description: "The name of the category";
|
|
124
108
|
};
|
|
125
|
-
readonly
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
readonly description: "The classification categories with their scores";
|
|
130
|
-
}, {
|
|
131
|
-
readonly type: "array";
|
|
132
|
-
readonly items: {
|
|
133
|
-
readonly type: "array";
|
|
134
|
-
readonly items: {
|
|
135
|
-
readonly type: "object";
|
|
136
|
-
readonly properties: {
|
|
137
|
-
readonly label: {
|
|
138
|
-
readonly type: "string";
|
|
139
|
-
readonly title: "Label";
|
|
140
|
-
readonly description: "The name of the category";
|
|
141
|
-
};
|
|
142
|
-
readonly score: {
|
|
143
|
-
readonly type: "number";
|
|
144
|
-
readonly title: "Score";
|
|
145
|
-
readonly description: "The confidence score for this category";
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
readonly required: readonly ["label", "score"];
|
|
149
|
-
readonly additionalProperties: false;
|
|
109
|
+
readonly score: {
|
|
110
|
+
readonly type: "number";
|
|
111
|
+
readonly title: "Score";
|
|
112
|
+
readonly description: "The confidence score for this category";
|
|
150
113
|
};
|
|
151
|
-
readonly title: "Categories";
|
|
152
|
-
readonly description: "The classification categories with their scores";
|
|
153
114
|
};
|
|
154
|
-
|
|
115
|
+
readonly required: readonly ["label", "score"];
|
|
116
|
+
readonly additionalProperties: false;
|
|
117
|
+
};
|
|
118
|
+
readonly title: "Categories";
|
|
119
|
+
readonly description: "The classification categories with their scores";
|
|
155
120
|
};
|
|
156
121
|
};
|
|
157
122
|
readonly required: readonly ["categories"];
|
|
@@ -195,19 +160,16 @@ export declare const textClassification: (input: {
|
|
|
195
160
|
tasks?: string[] | undefined;
|
|
196
161
|
title?: string | undefined;
|
|
197
162
|
};
|
|
198
|
-
text: string
|
|
199
|
-
}, config?:
|
|
163
|
+
text: string;
|
|
164
|
+
}, config?: TaskConfig | undefined) => Promise<{
|
|
200
165
|
categories: {
|
|
201
166
|
label: string;
|
|
202
167
|
score: number;
|
|
203
|
-
}[][] | {
|
|
204
|
-
label: string;
|
|
205
|
-
score: number;
|
|
206
168
|
}[];
|
|
207
169
|
}>;
|
|
208
170
|
declare module "@workglow/task-graph" {
|
|
209
171
|
interface Workflow {
|
|
210
|
-
textClassification: CreateWorkflow<TextClassificationTaskInput, TextClassificationTaskOutput,
|
|
172
|
+
textClassification: CreateWorkflow<TextClassificationTaskInput, TextClassificationTaskOutput, TaskConfig>;
|
|
211
173
|
}
|
|
212
174
|
}
|
|
213
175
|
//# sourceMappingURL=TextClassificationTask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextClassificationTask.d.ts","sourceRoot":"","sources":["../../src/task/TextClassificationTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"TextClassificationTask.d.ts","sourceRoot":"","sources":["../../src/task/TextClassificationTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,UAAU,EAAY,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAKvC,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BP,CAAC;AAEpC,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BR,CAAC;AAEpC,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAC3F,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAE7F;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,MAAM,CAChD,2BAA2B,EAC3B,4BAA4B,CAC7B;IACC,OAAc,IAAI,SAA4B;IAC9C,OAAc,QAAQ,SAAmB;IACzC,OAAc,KAAK,SAAqB;IACxC,OAAc,WAAW,SACwG;IACjI,OAAc,WAAW,IAAI,cAAc,CAE1C;IACD,OAAc,YAAY,IAAI,cAAc,CAE3C;CACF;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;EAE9B,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,kBAAkB,EAAE,cAAc,CAChC,2BAA2B,EAC3B,4BAA4B,EAC5B,UAAU,CACX,CAAC;KACH;CACF"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { CreateWorkflow,
|
|
6
|
+
import { CreateWorkflow, TaskConfig } from "@workglow/task-graph";
|
|
7
7
|
import { DataPortSchema, FromSchema, TypedArraySchemaOptions } from "@workglow/util/schema";
|
|
8
8
|
import { AiTask } from "./base/AiTask";
|
|
9
9
|
export declare const TextEmbeddingInputSchema: {
|
|
@@ -146,12 +146,12 @@ export declare const textEmbedding: (input: {
|
|
|
146
146
|
title?: string | undefined;
|
|
147
147
|
};
|
|
148
148
|
text: string | string[];
|
|
149
|
-
}, config?:
|
|
149
|
+
}, config?: TaskConfig | undefined) => Promise<{
|
|
150
150
|
vector: import("@workglow/util/schema").TypedArray[] | import("@workglow/util/schema").TypedArray;
|
|
151
151
|
}>;
|
|
152
152
|
declare module "@workglow/task-graph" {
|
|
153
153
|
interface Workflow {
|
|
154
|
-
textEmbedding: CreateWorkflow<TextEmbeddingTaskInput, TextEmbeddingTaskOutput,
|
|
154
|
+
textEmbedding: CreateWorkflow<TextEmbeddingTaskInput, TextEmbeddingTaskOutput, TaskConfig>;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
//# sourceMappingURL=TextEmbeddingTask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEmbeddingTask.d.ts","sourceRoot":"","sources":["../../src/task/TextEmbeddingTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"TextEmbeddingTask.d.ts","sourceRoot":"","sources":["../../src/task/TextEmbeddingTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,UAAU,EAAY,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EACL,cAAc,EACd,UAAU,EAEV,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAKvC,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYF,CAAC;AAEpC,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;CAYH,CAAC;AAEpC,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAC7C,OAAO,wBAAwB,EAC/B,uBAAuB,CACxB,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAC9C,OAAO,yBAAyB,EAChC,uBAAuB,CACxB,CAAC;AAEF;;;;;;GAMG;AACH,qBAAa,iBAAkB,SAAQ,MAAM,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;IAC5F,OAAc,IAAI,SAAuB;IACzC,OAAc,QAAQ,SAAmB;IACzC,OAAc,KAAK,SAAoB;IACvC,OAAc,WAAW,SAAsE;IAC/F,OAAc,WAAW,IAAI,cAAc,CAE1C;IACD,OAAc,YAAY,IAAI,cAAc,CAE3C;CACF;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;EAEzB,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,aAAa,EAAE,cAAc,CAAC,sBAAsB,EAAE,uBAAuB,EAAE,UAAU,CAAC,CAAC;KAC5F;CACF"}
|
|
@@ -3,25 +3,16 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { CreateWorkflow,
|
|
6
|
+
import { CreateWorkflow, TaskConfig } from "@workglow/task-graph";
|
|
7
7
|
import { DataPortSchema, FromSchema } from "@workglow/util/schema";
|
|
8
8
|
import { AiTask } from "./base/AiTask";
|
|
9
9
|
export declare const TextFillMaskInputSchema: {
|
|
10
10
|
readonly type: "object";
|
|
11
11
|
readonly properties: {
|
|
12
12
|
readonly text: {
|
|
13
|
-
readonly
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readonly description: "The text with a mask token to fill";
|
|
17
|
-
}, {
|
|
18
|
-
readonly type: "array";
|
|
19
|
-
readonly items: {
|
|
20
|
-
readonly type: "string";
|
|
21
|
-
readonly title: "Text";
|
|
22
|
-
readonly description: "The text with a mask token to fill";
|
|
23
|
-
};
|
|
24
|
-
}];
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly title: "Text";
|
|
15
|
+
readonly description: "The text with a mask token to fill";
|
|
25
16
|
};
|
|
26
17
|
readonly model: {
|
|
27
18
|
readonly oneOf: readonly [{
|
|
@@ -88,62 +79,31 @@ export declare const TextFillMaskOutputSchema: {
|
|
|
88
79
|
readonly type: "object";
|
|
89
80
|
readonly properties: {
|
|
90
81
|
readonly predictions: {
|
|
91
|
-
readonly
|
|
92
|
-
|
|
93
|
-
readonly
|
|
94
|
-
|
|
95
|
-
readonly
|
|
96
|
-
readonly
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
readonly description: "The token that was predicted to fill the mask";
|
|
100
|
-
};
|
|
101
|
-
readonly score: {
|
|
102
|
-
readonly type: "number";
|
|
103
|
-
readonly title: "Score";
|
|
104
|
-
readonly description: "The confidence score for this prediction";
|
|
105
|
-
};
|
|
106
|
-
readonly sequence: {
|
|
107
|
-
readonly type: "string";
|
|
108
|
-
readonly title: "Sequence";
|
|
109
|
-
readonly description: "The complete text with the mask filled";
|
|
110
|
-
};
|
|
82
|
+
readonly type: "array";
|
|
83
|
+
readonly items: {
|
|
84
|
+
readonly type: "object";
|
|
85
|
+
readonly properties: {
|
|
86
|
+
readonly entity: {
|
|
87
|
+
readonly type: "string";
|
|
88
|
+
readonly title: "Entity";
|
|
89
|
+
readonly description: "The token that was predicted to fill the mask";
|
|
111
90
|
};
|
|
112
|
-
readonly
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
readonly items: {
|
|
122
|
-
readonly type: "object";
|
|
123
|
-
readonly properties: {
|
|
124
|
-
readonly entity: {
|
|
125
|
-
readonly type: "string";
|
|
126
|
-
readonly title: "Entity";
|
|
127
|
-
readonly description: "The token that was predicted to fill the mask";
|
|
128
|
-
};
|
|
129
|
-
readonly score: {
|
|
130
|
-
readonly type: "number";
|
|
131
|
-
readonly title: "Score";
|
|
132
|
-
readonly description: "The confidence score for this prediction";
|
|
133
|
-
};
|
|
134
|
-
readonly sequence: {
|
|
135
|
-
readonly type: "string";
|
|
136
|
-
readonly title: "Sequence";
|
|
137
|
-
readonly description: "The complete text with the mask filled";
|
|
138
|
-
};
|
|
139
|
-
};
|
|
140
|
-
readonly required: readonly ["entity", "score", "sequence"];
|
|
141
|
-
readonly additionalProperties: false;
|
|
91
|
+
readonly score: {
|
|
92
|
+
readonly type: "number";
|
|
93
|
+
readonly title: "Score";
|
|
94
|
+
readonly description: "The confidence score for this prediction";
|
|
95
|
+
};
|
|
96
|
+
readonly sequence: {
|
|
97
|
+
readonly type: "string";
|
|
98
|
+
readonly title: "Sequence";
|
|
99
|
+
readonly description: "The complete text with the mask filled";
|
|
142
100
|
};
|
|
143
|
-
readonly title: "Predictions";
|
|
144
|
-
readonly description: "The predicted tokens to fill the mask with their scores and complete sequences";
|
|
145
101
|
};
|
|
146
|
-
|
|
102
|
+
readonly required: readonly ["entity", "score", "sequence"];
|
|
103
|
+
readonly additionalProperties: false;
|
|
104
|
+
};
|
|
105
|
+
readonly title: "Predictions";
|
|
106
|
+
readonly description: "The predicted tokens to fill the mask with their scores and complete sequences";
|
|
147
107
|
};
|
|
148
108
|
};
|
|
149
109
|
readonly required: readonly ["predictions"];
|
|
@@ -184,21 +144,17 @@ export declare const textFillMask: (input: {
|
|
|
184
144
|
tasks?: string[] | undefined;
|
|
185
145
|
title?: string | undefined;
|
|
186
146
|
};
|
|
187
|
-
text: string
|
|
188
|
-
}, config?:
|
|
147
|
+
text: string;
|
|
148
|
+
}, config?: TaskConfig | undefined) => Promise<{
|
|
189
149
|
predictions: {
|
|
190
150
|
entity: string;
|
|
191
151
|
score: number;
|
|
192
152
|
sequence: string;
|
|
193
|
-
}[][] | {
|
|
194
|
-
entity: string;
|
|
195
|
-
score: number;
|
|
196
|
-
sequence: string;
|
|
197
153
|
}[];
|
|
198
154
|
}>;
|
|
199
155
|
declare module "@workglow/task-graph" {
|
|
200
156
|
interface Workflow {
|
|
201
|
-
textFillMask: CreateWorkflow<TextFillMaskTaskInput, TextFillMaskTaskOutput,
|
|
157
|
+
textFillMask: CreateWorkflow<TextFillMaskTaskInput, TextFillMaskTaskOutput, TaskConfig>;
|
|
202
158
|
}
|
|
203
159
|
}
|
|
204
160
|
//# sourceMappingURL=TextFillMaskTask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFillMaskTask.d.ts","sourceRoot":"","sources":["../../src/task/TextFillMaskTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"TextFillMaskTask.d.ts","sourceRoot":"","sources":["../../src/task/TextFillMaskTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,UAAU,EAAY,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAKvC,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYD,CAAC;AAEpC,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCF,CAAC;AAEpC,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC/E,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEjF;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,MAAM,CAAC,qBAAqB,EAAE,sBAAsB,CAAC;IACzF,OAAc,IAAI,SAAsB;IACxC,OAAc,QAAQ,SAAmB;IACzC,OAAc,KAAK,SAAe;IAClC,OAAc,WAAW,SAAiC;IAC1D,OAAc,WAAW,IAAI,cAAc,CAE1C;IACD,OAAc,YAAY,IAAI,cAAc,CAE3C;CACF;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;EAExB,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,YAAY,EAAE,cAAc,CAAC,qBAAqB,EAAE,sBAAsB,EAAE,UAAU,CAAC,CAAC;KACzF;CACF"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { CreateWorkflow,
|
|
6
|
+
import { CreateWorkflow, TaskConfig } from "@workglow/task-graph";
|
|
7
7
|
import { DataPortSchema, FromSchema } from "@workglow/util/schema";
|
|
8
8
|
import { StreamingAiTask } from "./base/StreamingAiTask";
|
|
9
9
|
export declare const TextGenerationInputSchema: {
|
|
@@ -67,18 +67,9 @@ export declare const TextGenerationInputSchema: {
|
|
|
67
67
|
readonly format: import(".").TypeModelSemantic;
|
|
68
68
|
};
|
|
69
69
|
readonly prompt: {
|
|
70
|
-
readonly
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
readonly description: "The prompt to generate text from";
|
|
74
|
-
}, {
|
|
75
|
-
readonly type: "array";
|
|
76
|
-
readonly items: {
|
|
77
|
-
readonly type: "string";
|
|
78
|
-
readonly title: "Prompt";
|
|
79
|
-
readonly description: "The prompt to generate text from";
|
|
80
|
-
};
|
|
81
|
-
}];
|
|
70
|
+
readonly type: "string";
|
|
71
|
+
readonly title: "Prompt";
|
|
72
|
+
readonly description: "The prompt to generate text from";
|
|
82
73
|
};
|
|
83
74
|
readonly maxTokens: {
|
|
84
75
|
readonly type: "number";
|
|
@@ -128,20 +119,10 @@ export declare const TextGenerationOutputSchema: {
|
|
|
128
119
|
readonly type: "object";
|
|
129
120
|
readonly properties: {
|
|
130
121
|
readonly text: {
|
|
131
|
-
readonly
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
readonly "x-stream": "append";
|
|
136
|
-
}, {
|
|
137
|
-
readonly type: "array";
|
|
138
|
-
readonly items: {
|
|
139
|
-
readonly type: "string";
|
|
140
|
-
readonly title: "Text";
|
|
141
|
-
readonly description: "The generated text";
|
|
142
|
-
readonly "x-stream": "append";
|
|
143
|
-
};
|
|
144
|
-
}];
|
|
122
|
+
readonly type: "string";
|
|
123
|
+
readonly title: "Text";
|
|
124
|
+
readonly description: "The generated text";
|
|
125
|
+
readonly "x-stream": "append";
|
|
145
126
|
};
|
|
146
127
|
};
|
|
147
128
|
readonly required: readonly ["text"];
|
|
@@ -149,7 +130,7 @@ export declare const TextGenerationOutputSchema: {
|
|
|
149
130
|
};
|
|
150
131
|
export type TextGenerationTaskInput = FromSchema<typeof TextGenerationInputSchema>;
|
|
151
132
|
export type TextGenerationTaskOutput = FromSchema<typeof TextGenerationOutputSchema>;
|
|
152
|
-
export declare class TextGenerationTask extends StreamingAiTask<TextGenerationTaskInput, TextGenerationTaskOutput,
|
|
133
|
+
export declare class TextGenerationTask extends StreamingAiTask<TextGenerationTaskInput, TextGenerationTaskOutput, TaskConfig> {
|
|
153
134
|
static type: string;
|
|
154
135
|
static category: string;
|
|
155
136
|
static title: string;
|
|
@@ -179,15 +160,15 @@ export declare const textGeneration: (input: {
|
|
|
179
160
|
title?: string | undefined;
|
|
180
161
|
};
|
|
181
162
|
presencePenalty?: number | undefined;
|
|
182
|
-
prompt: string
|
|
163
|
+
prompt: string;
|
|
183
164
|
temperature?: number | undefined;
|
|
184
165
|
topP?: number | undefined;
|
|
185
|
-
}, config?:
|
|
186
|
-
text: string
|
|
166
|
+
}, config?: TaskConfig | undefined) => Promise<{
|
|
167
|
+
text: string;
|
|
187
168
|
}>;
|
|
188
169
|
declare module "@workglow/task-graph" {
|
|
189
170
|
interface Workflow {
|
|
190
|
-
textGeneration: CreateWorkflow<TextGenerationTaskInput, TextGenerationTaskOutput,
|
|
171
|
+
textGeneration: CreateWorkflow<TextGenerationTaskInput, TextGenerationTaskOutput, TaskConfig>;
|
|
191
172
|
}
|
|
192
173
|
}
|
|
193
174
|
//# sourceMappingURL=TextGenerationTask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextGenerationTask.d.ts","sourceRoot":"","sources":["../../src/task/TextGenerationTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"TextGenerationTask.d.ts","sourceRoot":"","sources":["../../src/task/TextGenerationTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,UAAU,EAAY,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAWzD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDH,CAAC;AAEpC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;CAOJ,CAAC;AAEpC,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACnF,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAErF,qBAAa,kBAAmB,SAAQ,eAAe,CACrD,uBAAuB,EACvB,wBAAwB,EACxB,UAAU,CACX;IACC,OAAc,IAAI,SAAwB;IAC1C,OAAc,QAAQ,SAAmB;IACzC,OAAc,KAAK,SAAqB;IACxC,OAAc,WAAW,SAC2D;IACpF,OAAc,WAAW,IAAI,cAAc,CAE1C;IACD,OAAc,YAAY,IAAI,cAAc,CAE3C;CACF;AAED;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;EAE1B,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC,CAAC;IACrC,UAAU,QAAQ;QAChB,cAAc,EAAE,cAAc,CAAC,uBAAuB,EAAE,wBAAwB,EAAE,UAAU,CAAC,CAAC;KAC/F;CACF"}
|