@workglow/ai 0.0.85 → 0.0.87
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 +165 -34
- package/dist/browser.js +3948 -1450
- package/dist/browser.js.map +50 -39
- package/dist/bun.js +3948 -1450
- package/dist/bun.js.map +50 -39
- package/dist/common.d.ts +0 -3
- package/dist/common.d.ts.map +1 -1
- package/dist/model/ModelRegistry.d.ts +2 -2
- package/dist/model/ModelRegistry.d.ts.map +1 -1
- package/dist/model/ModelRepository.d.ts +3 -3
- package/dist/model/ModelRepository.d.ts.map +1 -1
- package/dist/model/ModelSchema.d.ts +1 -1
- package/dist/node.js +3948 -1450
- package/dist/node.js.map +50 -39
- package/dist/provider/AiProviderRegistry.d.ts +1 -0
- package/dist/provider/AiProviderRegistry.d.ts.map +1 -1
- package/dist/task/BackgroundRemovalTask.d.ts +121 -289
- package/dist/task/BackgroundRemovalTask.d.ts.map +1 -1
- package/dist/task/ChunkRetrievalTask.d.ts +243 -0
- package/dist/task/ChunkRetrievalTask.d.ts.map +1 -0
- package/dist/task/ChunkToVectorTask.d.ts +183 -0
- package/dist/task/ChunkToVectorTask.d.ts.map +1 -0
- package/dist/task/ChunkVectorHybridSearchTask.d.ts +160 -0
- package/dist/task/ChunkVectorHybridSearchTask.d.ts.map +1 -0
- package/dist/task/ChunkVectorSearchTask.d.ts +137 -0
- package/dist/task/ChunkVectorSearchTask.d.ts.map +1 -0
- package/dist/task/ChunkVectorUpsertTask.d.ts +120 -0
- package/dist/task/ChunkVectorUpsertTask.d.ts.map +1 -0
- package/dist/task/ContextBuilderTask.d.ts +131 -0
- package/dist/task/ContextBuilderTask.d.ts.map +1 -0
- package/dist/task/DocumentEnricherTask.d.ts +232 -0
- package/dist/task/DocumentEnricherTask.d.ts.map +1 -0
- package/dist/task/DownloadModelTask.d.ts +80 -208
- package/dist/task/DownloadModelTask.d.ts.map +1 -1
- package/dist/task/FaceDetectorTask.d.ts +117 -272
- package/dist/task/FaceDetectorTask.d.ts.map +1 -1
- package/dist/task/FaceLandmarkerTask.d.ts +117 -272
- package/dist/task/FaceLandmarkerTask.d.ts.map +1 -1
- package/dist/task/GestureRecognizerTask.d.ts +129 -284
- package/dist/task/GestureRecognizerTask.d.ts.map +1 -1
- package/dist/task/HandLandmarkerTask.d.ts +125 -280
- package/dist/task/HandLandmarkerTask.d.ts.map +1 -1
- package/dist/task/HierarchicalChunkerTask.d.ts +212 -0
- package/dist/task/HierarchicalChunkerTask.d.ts.map +1 -0
- package/dist/task/HierarchyJoinTask.d.ts +318 -0
- package/dist/task/HierarchyJoinTask.d.ts.map +1 -0
- package/dist/task/ImageClassificationTask.d.ts +117 -272
- package/dist/task/ImageClassificationTask.d.ts.map +1 -1
- package/dist/task/ImageEmbeddingTask.d.ts +125 -446
- package/dist/task/ImageEmbeddingTask.d.ts.map +1 -1
- package/dist/task/ImageSegmentationTask.d.ts +117 -272
- package/dist/task/ImageSegmentationTask.d.ts.map +1 -1
- package/dist/task/ImageToTextTask.d.ts +117 -272
- package/dist/task/ImageToTextTask.d.ts.map +1 -1
- package/dist/task/ObjectDetectionTask.d.ts +119 -274
- package/dist/task/ObjectDetectionTask.d.ts.map +1 -1
- package/dist/task/PoseLandmarkerTask.d.ts +117 -272
- package/dist/task/PoseLandmarkerTask.d.ts.map +1 -1
- package/dist/task/QueryExpanderTask.d.ts +129 -0
- package/dist/task/QueryExpanderTask.d.ts.map +1 -0
- package/dist/task/RerankerTask.d.ts +209 -0
- package/dist/task/RerankerTask.d.ts.map +1 -0
- package/dist/task/StructuralParserTask.d.ts +91 -0
- package/dist/task/StructuralParserTask.d.ts.map +1 -0
- package/dist/task/TextChunkerTask.d.ts +129 -0
- package/dist/task/TextChunkerTask.d.ts.map +1 -0
- package/dist/task/TextClassificationTask.d.ts +42 -115
- package/dist/task/TextClassificationTask.d.ts.map +1 -1
- package/dist/task/TextEmbeddingTask.d.ts +55 -277
- package/dist/task/TextEmbeddingTask.d.ts.map +1 -1
- package/dist/task/TextFillMaskTask.d.ts +42 -115
- package/dist/task/TextFillMaskTask.d.ts.map +1 -1
- package/dist/task/TextGenerationTask.d.ts +44 -128
- package/dist/task/TextGenerationTask.d.ts.map +1 -1
- package/dist/task/TextLanguageDetectionTask.d.ts +42 -115
- package/dist/task/TextLanguageDetectionTask.d.ts.map +1 -1
- package/dist/task/TextNamedEntityRecognitionTask.d.ts +42 -115
- package/dist/task/TextNamedEntityRecognitionTask.d.ts.map +1 -1
- package/dist/task/TextQuestionAnswerTask.d.ts +47 -144
- package/dist/task/TextQuestionAnswerTask.d.ts.map +1 -1
- package/dist/task/TextRewriterTask.d.ts +45 -131
- package/dist/task/TextRewriterTask.d.ts.map +1 -1
- package/dist/task/TextSummaryTask.d.ts +42 -115
- package/dist/task/TextSummaryTask.d.ts.map +1 -1
- package/dist/task/TextTranslationTask.d.ts +54 -168
- package/dist/task/TextTranslationTask.d.ts.map +1 -1
- package/dist/task/TopicSegmenterTask.d.ts +148 -0
- package/dist/task/TopicSegmenterTask.d.ts.map +1 -0
- package/dist/task/UnloadModelTask.d.ts +80 -208
- package/dist/task/UnloadModelTask.d.ts.map +1 -1
- package/dist/task/VectorQuantizeTask.d.ts +120 -0
- package/dist/task/VectorQuantizeTask.d.ts.map +1 -0
- package/dist/task/VectorSimilarityTask.d.ts +18 -253
- package/dist/task/VectorSimilarityTask.d.ts.map +1 -1
- package/dist/task/base/AiTask.d.ts +24 -22
- package/dist/task/base/AiTask.d.ts.map +1 -1
- package/dist/task/base/AiTaskSchemas.d.ts +5 -129
- package/dist/task/base/AiTaskSchemas.d.ts.map +1 -1
- package/dist/task/base/AiVisionTask.d.ts +1 -4
- package/dist/task/base/AiVisionTask.d.ts.map +1 -1
- package/dist/task/index.d.ts +54 -1
- package/dist/task/index.d.ts.map +1 -1
- package/package.json +14 -9
- package/dist/source/Document.d.ts +0 -56
- package/dist/source/Document.d.ts.map +0 -1
- package/dist/source/DocumentConverter.d.ts +0 -15
- package/dist/source/DocumentConverter.d.ts.map +0 -1
- package/dist/source/DocumentConverterMarkdown.d.ts +0 -13
- package/dist/source/DocumentConverterMarkdown.d.ts.map +0 -1
- package/dist/source/DocumentConverterText.d.ts +0 -13
- package/dist/source/DocumentConverterText.d.ts.map +0 -1
- package/dist/source/MasterDocument.d.ts +0 -27
- package/dist/source/MasterDocument.d.ts.map +0 -1
- package/dist/source/index.d.ts +0 -10
- package/dist/source/index.d.ts.map +0 -1
- package/dist/task/DocumentSplitterTask.d.ts +0 -58
- package/dist/task/DocumentSplitterTask.d.ts.map +0 -1
|
@@ -4,135 +4,73 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { CreateWorkflow, JobQueueTaskConfig } from "@workglow/task-graph";
|
|
7
|
-
import { DataPortSchema, FromSchema } from "@workglow/util";
|
|
7
|
+
import { DataPortSchema, FromSchema, TypedArraySchemaOptions } from "@workglow/util";
|
|
8
8
|
import { AiTask } from "./base/AiTask";
|
|
9
|
-
import { DeReplicateFromSchema, TypedArraySchemaOptions } from "./base/AiTaskSchemas";
|
|
10
9
|
export declare const TextEmbeddingInputSchema: {
|
|
11
10
|
readonly type: "object";
|
|
12
11
|
readonly properties: {
|
|
13
12
|
readonly text: {
|
|
14
|
-
readonly
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
title: string;
|
|
19
|
-
description: string;
|
|
13
|
+
readonly anyOf: readonly [{
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly title: "Text";
|
|
16
|
+
readonly description: "The text to embed";
|
|
20
17
|
}, {
|
|
21
18
|
readonly type: "array";
|
|
22
19
|
readonly items: {
|
|
23
|
-
type: "string";
|
|
24
|
-
title:
|
|
25
|
-
description:
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly title: "Text";
|
|
22
|
+
readonly description: "The text to embed";
|
|
26
23
|
};
|
|
27
24
|
}];
|
|
28
|
-
readonly title: string | undefined;
|
|
29
|
-
readonly description: string | undefined;
|
|
30
25
|
};
|
|
31
26
|
readonly model: {
|
|
32
|
-
readonly "x-replicate": true;
|
|
33
|
-
readonly format?: string | undefined;
|
|
34
27
|
readonly oneOf: readonly [{
|
|
35
|
-
readonly
|
|
36
|
-
|
|
37
|
-
readonly description: `The model ${string}`;
|
|
38
|
-
} & {
|
|
39
|
-
readonly format: import(".").TypeModelSemantic;
|
|
40
|
-
readonly type: "string";
|
|
41
|
-
}, {
|
|
42
|
-
readonly type: "object";
|
|
43
|
-
readonly properties: {
|
|
44
|
-
readonly model_id: {
|
|
45
|
-
readonly type: "string";
|
|
46
|
-
};
|
|
47
|
-
readonly tasks: {
|
|
48
|
-
readonly type: "array";
|
|
49
|
-
readonly items: {
|
|
50
|
-
readonly type: "string";
|
|
51
|
-
};
|
|
52
|
-
readonly "x-ui-editor": "multiselect";
|
|
53
|
-
};
|
|
54
|
-
readonly title: {
|
|
55
|
-
readonly type: "string";
|
|
56
|
-
};
|
|
57
|
-
readonly description: {
|
|
58
|
-
readonly type: "string";
|
|
59
|
-
readonly "x-ui-editor": "textarea";
|
|
60
|
-
};
|
|
61
|
-
readonly provider: {
|
|
62
|
-
readonly type: "string";
|
|
63
|
-
};
|
|
64
|
-
readonly provider_config: {
|
|
65
|
-
readonly type: "object";
|
|
66
|
-
readonly default: {};
|
|
67
|
-
};
|
|
68
|
-
readonly metadata: {
|
|
69
|
-
readonly type: "object";
|
|
70
|
-
readonly default: {};
|
|
71
|
-
readonly "x-ui-hidden": true;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
readonly required: readonly ["provider", "provider_config"];
|
|
75
|
-
readonly format: "model";
|
|
76
|
-
readonly additionalProperties: false;
|
|
77
|
-
} & {
|
|
78
|
-
readonly format: import(".").TypeModelSemantic;
|
|
79
|
-
}];
|
|
28
|
+
readonly title: "Model";
|
|
29
|
+
readonly description: `The model ${string}`;
|
|
80
30
|
} & {
|
|
81
31
|
readonly format: import(".").TypeModelSemantic;
|
|
32
|
+
readonly type: "string";
|
|
82
33
|
}, {
|
|
83
|
-
readonly type: "
|
|
84
|
-
readonly
|
|
85
|
-
readonly
|
|
86
|
-
readonly title: "Model";
|
|
87
|
-
readonly description: `The model ${string}`;
|
|
88
|
-
} & {
|
|
89
|
-
readonly format: import(".").TypeModelSemantic;
|
|
34
|
+
readonly type: "object";
|
|
35
|
+
readonly properties: {
|
|
36
|
+
readonly model_id: {
|
|
90
37
|
readonly type: "string";
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
readonly
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
};
|
|
97
|
-
readonly tasks: {
|
|
98
|
-
readonly type: "array";
|
|
99
|
-
readonly items: {
|
|
100
|
-
readonly type: "string";
|
|
101
|
-
};
|
|
102
|
-
readonly "x-ui-editor": "multiselect";
|
|
103
|
-
};
|
|
104
|
-
readonly title: {
|
|
105
|
-
readonly type: "string";
|
|
106
|
-
};
|
|
107
|
-
readonly description: {
|
|
108
|
-
readonly type: "string";
|
|
109
|
-
readonly "x-ui-editor": "textarea";
|
|
110
|
-
};
|
|
111
|
-
readonly provider: {
|
|
112
|
-
readonly type: "string";
|
|
113
|
-
};
|
|
114
|
-
readonly provider_config: {
|
|
115
|
-
readonly type: "object";
|
|
116
|
-
readonly default: {};
|
|
117
|
-
};
|
|
118
|
-
readonly metadata: {
|
|
119
|
-
readonly type: "object";
|
|
120
|
-
readonly default: {};
|
|
121
|
-
readonly "x-ui-hidden": true;
|
|
122
|
-
};
|
|
38
|
+
};
|
|
39
|
+
readonly tasks: {
|
|
40
|
+
readonly type: "array";
|
|
41
|
+
readonly items: {
|
|
42
|
+
readonly type: "string";
|
|
123
43
|
};
|
|
124
|
-
readonly
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
44
|
+
readonly "x-ui-editor": "multiselect";
|
|
45
|
+
};
|
|
46
|
+
readonly title: {
|
|
47
|
+
readonly type: "string";
|
|
48
|
+
};
|
|
49
|
+
readonly description: {
|
|
50
|
+
readonly type: "string";
|
|
51
|
+
readonly "x-ui-editor": "textarea";
|
|
52
|
+
};
|
|
53
|
+
readonly provider: {
|
|
54
|
+
readonly type: "string";
|
|
55
|
+
};
|
|
56
|
+
readonly provider_config: {
|
|
57
|
+
readonly type: "object";
|
|
58
|
+
readonly default: {};
|
|
59
|
+
};
|
|
60
|
+
readonly metadata: {
|
|
61
|
+
readonly type: "object";
|
|
62
|
+
readonly default: {};
|
|
63
|
+
readonly "x-ui-hidden": true;
|
|
64
|
+
};
|
|
132
65
|
};
|
|
66
|
+
readonly required: readonly ["provider", "provider_config"];
|
|
67
|
+
readonly format: "model";
|
|
68
|
+
readonly additionalProperties: true;
|
|
69
|
+
} & {
|
|
70
|
+
readonly format: import(".").TypeModelSemantic;
|
|
133
71
|
}];
|
|
134
|
-
|
|
135
|
-
readonly
|
|
72
|
+
} & {
|
|
73
|
+
readonly format: import(".").TypeModelSemantic;
|
|
136
74
|
};
|
|
137
75
|
};
|
|
138
76
|
readonly required: readonly ["text", "model"];
|
|
@@ -142,178 +80,20 @@ export declare const TextEmbeddingOutputSchema: {
|
|
|
142
80
|
readonly type: "object";
|
|
143
81
|
readonly properties: {
|
|
144
82
|
readonly vector: {
|
|
145
|
-
readonly
|
|
146
|
-
|
|
147
|
-
readonly oneOf: readonly [{
|
|
148
|
-
readonly oneOf: readonly [{
|
|
149
|
-
readonly type: "array";
|
|
150
|
-
readonly items: {
|
|
151
|
-
readonly type: "number";
|
|
152
|
-
readonly format: "Float64";
|
|
153
|
-
};
|
|
154
|
-
readonly title: "Float64Array";
|
|
155
|
-
readonly description: "A 64-bit floating point array";
|
|
156
|
-
readonly format: "Float64Array";
|
|
157
|
-
}, {
|
|
158
|
-
readonly type: "array";
|
|
159
|
-
readonly items: {
|
|
160
|
-
readonly type: "number";
|
|
161
|
-
readonly format: "Float32";
|
|
162
|
-
};
|
|
163
|
-
readonly title: "Float32Array";
|
|
164
|
-
readonly description: "A 32-bit floating point array";
|
|
165
|
-
readonly format: "Float32Array";
|
|
166
|
-
}, {
|
|
167
|
-
readonly type: "array";
|
|
168
|
-
readonly items: {
|
|
169
|
-
readonly type: "number";
|
|
170
|
-
readonly format: "Int32";
|
|
171
|
-
};
|
|
172
|
-
readonly title: "Int32Array";
|
|
173
|
-
readonly description: "A 32-bit integer array";
|
|
174
|
-
readonly format: "Int32Array";
|
|
175
|
-
}, {
|
|
176
|
-
readonly type: "array";
|
|
177
|
-
readonly items: {
|
|
178
|
-
readonly type: "number";
|
|
179
|
-
readonly format: "Int16";
|
|
180
|
-
};
|
|
181
|
-
readonly title: "Int16Array";
|
|
182
|
-
readonly description: "A 16-bit integer array";
|
|
183
|
-
readonly format: "Int16Array";
|
|
184
|
-
}, {
|
|
185
|
-
readonly type: "array";
|
|
186
|
-
readonly items: {
|
|
187
|
-
readonly type: "number";
|
|
188
|
-
readonly format: "Int8";
|
|
189
|
-
};
|
|
190
|
-
readonly title: "Int8Array";
|
|
191
|
-
}, {
|
|
192
|
-
readonly type: "array";
|
|
193
|
-
readonly items: {
|
|
194
|
-
readonly type: "number";
|
|
195
|
-
readonly format: "Uint8";
|
|
196
|
-
};
|
|
197
|
-
readonly title: "Uint8Array";
|
|
198
|
-
readonly description: "A 8-bit unsigned integer array";
|
|
199
|
-
readonly format: "Uint8Array";
|
|
200
|
-
}, {
|
|
201
|
-
readonly type: "array";
|
|
202
|
-
readonly items: {
|
|
203
|
-
readonly type: "number";
|
|
204
|
-
readonly format: "Uint16";
|
|
205
|
-
};
|
|
206
|
-
readonly title: "Uint16Array";
|
|
207
|
-
readonly description: "A 16-bit unsigned integer array";
|
|
208
|
-
readonly format: "Uint16Array";
|
|
209
|
-
}, {
|
|
210
|
-
readonly type: "array";
|
|
211
|
-
readonly items: {
|
|
212
|
-
readonly type: "number";
|
|
213
|
-
readonly format: "Uint32";
|
|
214
|
-
};
|
|
215
|
-
readonly title: "Uint32Array";
|
|
216
|
-
readonly description: "A 32-bit unsigned integer array";
|
|
217
|
-
readonly format: "Uint32Array";
|
|
218
|
-
}, {
|
|
219
|
-
readonly type: "array";
|
|
220
|
-
readonly items: {
|
|
221
|
-
readonly type: "number";
|
|
222
|
-
readonly format: "Uint8Clamped";
|
|
223
|
-
};
|
|
224
|
-
readonly title: "Uint8ClampedArray";
|
|
225
|
-
readonly description: "A 8-bit unsigned integer array with values clamped to 0-255";
|
|
226
|
-
readonly format: "Uint8ClampedArray";
|
|
227
|
-
}];
|
|
83
|
+
readonly anyOf: readonly [{
|
|
84
|
+
readonly type: "array";
|
|
228
85
|
readonly format: "TypedArray";
|
|
86
|
+
readonly title: "Typed Array";
|
|
87
|
+
readonly description: "A typed array (Float32Array, Int8Array, etc.)";
|
|
229
88
|
}, {
|
|
230
89
|
readonly type: "array";
|
|
231
90
|
readonly items: {
|
|
232
|
-
readonly
|
|
233
|
-
readonly type: "array";
|
|
234
|
-
readonly items: {
|
|
235
|
-
readonly type: "number";
|
|
236
|
-
readonly format: "Float64";
|
|
237
|
-
};
|
|
238
|
-
readonly title: "Float64Array";
|
|
239
|
-
readonly description: "A 64-bit floating point array";
|
|
240
|
-
readonly format: "Float64Array";
|
|
241
|
-
}, {
|
|
242
|
-
readonly type: "array";
|
|
243
|
-
readonly items: {
|
|
244
|
-
readonly type: "number";
|
|
245
|
-
readonly format: "Float32";
|
|
246
|
-
};
|
|
247
|
-
readonly title: "Float32Array";
|
|
248
|
-
readonly description: "A 32-bit floating point array";
|
|
249
|
-
readonly format: "Float32Array";
|
|
250
|
-
}, {
|
|
251
|
-
readonly type: "array";
|
|
252
|
-
readonly items: {
|
|
253
|
-
readonly type: "number";
|
|
254
|
-
readonly format: "Int32";
|
|
255
|
-
};
|
|
256
|
-
readonly title: "Int32Array";
|
|
257
|
-
readonly description: "A 32-bit integer array";
|
|
258
|
-
readonly format: "Int32Array";
|
|
259
|
-
}, {
|
|
260
|
-
readonly type: "array";
|
|
261
|
-
readonly items: {
|
|
262
|
-
readonly type: "number";
|
|
263
|
-
readonly format: "Int16";
|
|
264
|
-
};
|
|
265
|
-
readonly title: "Int16Array";
|
|
266
|
-
readonly description: "A 16-bit integer array";
|
|
267
|
-
readonly format: "Int16Array";
|
|
268
|
-
}, {
|
|
269
|
-
readonly type: "array";
|
|
270
|
-
readonly items: {
|
|
271
|
-
readonly type: "number";
|
|
272
|
-
readonly format: "Int8";
|
|
273
|
-
};
|
|
274
|
-
readonly title: "Int8Array";
|
|
275
|
-
}, {
|
|
276
|
-
readonly type: "array";
|
|
277
|
-
readonly items: {
|
|
278
|
-
readonly type: "number";
|
|
279
|
-
readonly format: "Uint8";
|
|
280
|
-
};
|
|
281
|
-
readonly title: "Uint8Array";
|
|
282
|
-
readonly description: "A 8-bit unsigned integer array";
|
|
283
|
-
readonly format: "Uint8Array";
|
|
284
|
-
}, {
|
|
285
|
-
readonly type: "array";
|
|
286
|
-
readonly items: {
|
|
287
|
-
readonly type: "number";
|
|
288
|
-
readonly format: "Uint16";
|
|
289
|
-
};
|
|
290
|
-
readonly title: "Uint16Array";
|
|
291
|
-
readonly description: "A 16-bit unsigned integer array";
|
|
292
|
-
readonly format: "Uint16Array";
|
|
293
|
-
}, {
|
|
294
|
-
readonly type: "array";
|
|
295
|
-
readonly items: {
|
|
296
|
-
readonly type: "number";
|
|
297
|
-
readonly format: "Uint32";
|
|
298
|
-
};
|
|
299
|
-
readonly title: "Uint32Array";
|
|
300
|
-
readonly description: "A 32-bit unsigned integer array";
|
|
301
|
-
readonly format: "Uint32Array";
|
|
302
|
-
}, {
|
|
303
|
-
readonly type: "array";
|
|
304
|
-
readonly items: {
|
|
305
|
-
readonly type: "number";
|
|
306
|
-
readonly format: "Uint8Clamped";
|
|
307
|
-
};
|
|
308
|
-
readonly title: "Uint8ClampedArray";
|
|
309
|
-
readonly description: "A 8-bit unsigned integer array with values clamped to 0-255";
|
|
310
|
-
readonly format: "Uint8ClampedArray";
|
|
311
|
-
}];
|
|
91
|
+
readonly type: "array";
|
|
312
92
|
readonly format: "TypedArray";
|
|
93
|
+
readonly title: "Typed Array";
|
|
94
|
+
readonly description: "A typed array (Float32Array, Int8Array, etc.)";
|
|
313
95
|
};
|
|
314
96
|
}];
|
|
315
|
-
readonly title: string | undefined;
|
|
316
|
-
readonly description: string | undefined;
|
|
317
97
|
};
|
|
318
98
|
};
|
|
319
99
|
readonly required: readonly ["vector"];
|
|
@@ -321,8 +101,6 @@ export declare const TextEmbeddingOutputSchema: {
|
|
|
321
101
|
};
|
|
322
102
|
export type TextEmbeddingTaskInput = FromSchema<typeof TextEmbeddingInputSchema, TypedArraySchemaOptions>;
|
|
323
103
|
export type TextEmbeddingTaskOutput = FromSchema<typeof TextEmbeddingOutputSchema, TypedArraySchemaOptions>;
|
|
324
|
-
export type TextEmbeddingTaskExecuteInput = DeReplicateFromSchema<typeof TextEmbeddingInputSchema>;
|
|
325
|
-
export type TextEmbeddingTaskExecuteOutput = DeReplicateFromSchema<typeof TextEmbeddingOutputSchema>;
|
|
326
104
|
/**
|
|
327
105
|
* A task that generates vector embeddings for text using a specified embedding model.
|
|
328
106
|
* Embeddings are numerical representations of text that capture semantic meaning,
|
|
@@ -344,7 +122,7 @@ export declare class TextEmbeddingTask extends AiTask<TextEmbeddingTaskInput, Te
|
|
|
344
122
|
* @returns Promise resolving to the generated embeddings
|
|
345
123
|
*/
|
|
346
124
|
export declare const textEmbedding: (input: TextEmbeddingTaskInput, config?: JobQueueTaskConfig) => Promise<{
|
|
347
|
-
vector: import("
|
|
125
|
+
vector: import("@workglow/util").TypedArray | import("@workglow/util").TypedArray[];
|
|
348
126
|
}>;
|
|
349
127
|
declare module "@workglow/task-graph" {
|
|
350
128
|
interface Workflow {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEmbeddingTask.d.ts","sourceRoot":"","sources":["../../src/task/TextEmbeddingTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"TextEmbeddingTask.d.ts","sourceRoot":"","sources":["../../src/task/TextEmbeddingTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAY,MAAM,sBAAsB,CAAC;AACpF,OAAO,EACL,cAAc,EACd,UAAU,EAEV,uBAAuB,EACxB,MAAM,gBAAgB,CAAC;AACxB,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;WACjF,WAAW,IAAI,cAAc;WAG7B,YAAY,IAAI,cAAc;CAG7C;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAU,OAAO,sBAAsB,EAAE,SAAS,kBAAkB;;EAE7F,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,aAAa,EAAE,cAAc,CAC3B,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,CACnB,CAAC;KACH;CACF"}
|
|
@@ -6,133 +6,62 @@
|
|
|
6
6
|
import { CreateWorkflow, JobQueueTaskConfig } from "@workglow/task-graph";
|
|
7
7
|
import { DataPortSchema, FromSchema } from "@workglow/util";
|
|
8
8
|
import { AiTask } from "./base/AiTask";
|
|
9
|
-
import { DeReplicateFromSchema } from "./base/AiTaskSchemas";
|
|
10
9
|
export declare const TextFillMaskInputSchema: {
|
|
11
10
|
readonly type: "object";
|
|
12
11
|
readonly properties: {
|
|
13
12
|
readonly text: {
|
|
14
|
-
readonly "
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
type: "string";
|
|
18
|
-
title: string;
|
|
19
|
-
description: string;
|
|
20
|
-
}, {
|
|
21
|
-
readonly type: "array";
|
|
22
|
-
readonly items: {
|
|
23
|
-
type: "string";
|
|
24
|
-
title: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
|
-
}];
|
|
28
|
-
readonly title: string | undefined;
|
|
29
|
-
readonly description: string | undefined;
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly title: "Text";
|
|
15
|
+
readonly description: "The text with a mask token to fill";
|
|
30
16
|
};
|
|
31
17
|
readonly model: {
|
|
32
|
-
readonly "x-replicate": true;
|
|
33
|
-
readonly format?: string | undefined;
|
|
34
18
|
readonly oneOf: readonly [{
|
|
35
|
-
readonly
|
|
36
|
-
|
|
37
|
-
readonly description: `The model ${string}`;
|
|
38
|
-
} & {
|
|
39
|
-
readonly format: import(".").TypeModelSemantic;
|
|
40
|
-
readonly type: "string";
|
|
41
|
-
}, {
|
|
42
|
-
readonly type: "object";
|
|
43
|
-
readonly properties: {
|
|
44
|
-
readonly model_id: {
|
|
45
|
-
readonly type: "string";
|
|
46
|
-
};
|
|
47
|
-
readonly tasks: {
|
|
48
|
-
readonly type: "array";
|
|
49
|
-
readonly items: {
|
|
50
|
-
readonly type: "string";
|
|
51
|
-
};
|
|
52
|
-
readonly "x-ui-editor": "multiselect";
|
|
53
|
-
};
|
|
54
|
-
readonly title: {
|
|
55
|
-
readonly type: "string";
|
|
56
|
-
};
|
|
57
|
-
readonly description: {
|
|
58
|
-
readonly type: "string";
|
|
59
|
-
readonly "x-ui-editor": "textarea";
|
|
60
|
-
};
|
|
61
|
-
readonly provider: {
|
|
62
|
-
readonly type: "string";
|
|
63
|
-
};
|
|
64
|
-
readonly provider_config: {
|
|
65
|
-
readonly type: "object";
|
|
66
|
-
readonly default: {};
|
|
67
|
-
};
|
|
68
|
-
readonly metadata: {
|
|
69
|
-
readonly type: "object";
|
|
70
|
-
readonly default: {};
|
|
71
|
-
readonly "x-ui-hidden": true;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
readonly required: readonly ["provider", "provider_config"];
|
|
75
|
-
readonly format: "model";
|
|
76
|
-
readonly additionalProperties: false;
|
|
77
|
-
} & {
|
|
78
|
-
readonly format: import(".").TypeModelSemantic;
|
|
79
|
-
}];
|
|
19
|
+
readonly title: "Model";
|
|
20
|
+
readonly description: `The model ${string}`;
|
|
80
21
|
} & {
|
|
81
22
|
readonly format: import(".").TypeModelSemantic;
|
|
23
|
+
readonly type: "string";
|
|
82
24
|
}, {
|
|
83
|
-
readonly type: "
|
|
84
|
-
readonly
|
|
85
|
-
readonly
|
|
86
|
-
readonly title: "Model";
|
|
87
|
-
readonly description: `The model ${string}`;
|
|
88
|
-
} & {
|
|
89
|
-
readonly format: import(".").TypeModelSemantic;
|
|
25
|
+
readonly type: "object";
|
|
26
|
+
readonly properties: {
|
|
27
|
+
readonly model_id: {
|
|
90
28
|
readonly type: "string";
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
readonly
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
};
|
|
97
|
-
readonly tasks: {
|
|
98
|
-
readonly type: "array";
|
|
99
|
-
readonly items: {
|
|
100
|
-
readonly type: "string";
|
|
101
|
-
};
|
|
102
|
-
readonly "x-ui-editor": "multiselect";
|
|
103
|
-
};
|
|
104
|
-
readonly title: {
|
|
105
|
-
readonly type: "string";
|
|
106
|
-
};
|
|
107
|
-
readonly description: {
|
|
108
|
-
readonly type: "string";
|
|
109
|
-
readonly "x-ui-editor": "textarea";
|
|
110
|
-
};
|
|
111
|
-
readonly provider: {
|
|
112
|
-
readonly type: "string";
|
|
113
|
-
};
|
|
114
|
-
readonly provider_config: {
|
|
115
|
-
readonly type: "object";
|
|
116
|
-
readonly default: {};
|
|
117
|
-
};
|
|
118
|
-
readonly metadata: {
|
|
119
|
-
readonly type: "object";
|
|
120
|
-
readonly default: {};
|
|
121
|
-
readonly "x-ui-hidden": true;
|
|
122
|
-
};
|
|
29
|
+
};
|
|
30
|
+
readonly tasks: {
|
|
31
|
+
readonly type: "array";
|
|
32
|
+
readonly items: {
|
|
33
|
+
readonly type: "string";
|
|
123
34
|
};
|
|
124
|
-
readonly
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
35
|
+
readonly "x-ui-editor": "multiselect";
|
|
36
|
+
};
|
|
37
|
+
readonly title: {
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
};
|
|
40
|
+
readonly description: {
|
|
41
|
+
readonly type: "string";
|
|
42
|
+
readonly "x-ui-editor": "textarea";
|
|
43
|
+
};
|
|
44
|
+
readonly provider: {
|
|
45
|
+
readonly type: "string";
|
|
46
|
+
};
|
|
47
|
+
readonly provider_config: {
|
|
48
|
+
readonly type: "object";
|
|
49
|
+
readonly default: {};
|
|
50
|
+
};
|
|
51
|
+
readonly metadata: {
|
|
52
|
+
readonly type: "object";
|
|
53
|
+
readonly default: {};
|
|
54
|
+
readonly "x-ui-hidden": true;
|
|
55
|
+
};
|
|
132
56
|
};
|
|
57
|
+
readonly required: readonly ["provider", "provider_config"];
|
|
58
|
+
readonly format: "model";
|
|
59
|
+
readonly additionalProperties: true;
|
|
60
|
+
} & {
|
|
61
|
+
readonly format: import(".").TypeModelSemantic;
|
|
133
62
|
}];
|
|
134
|
-
|
|
135
|
-
readonly
|
|
63
|
+
} & {
|
|
64
|
+
readonly format: import(".").TypeModelSemantic;
|
|
136
65
|
};
|
|
137
66
|
};
|
|
138
67
|
readonly required: readonly ["text", "model"];
|
|
@@ -174,8 +103,6 @@ export declare const TextFillMaskOutputSchema: {
|
|
|
174
103
|
};
|
|
175
104
|
export type TextFillMaskTaskInput = FromSchema<typeof TextFillMaskInputSchema>;
|
|
176
105
|
export type TextFillMaskTaskOutput = FromSchema<typeof TextFillMaskOutputSchema>;
|
|
177
|
-
export type TextFillMaskTaskExecuteInput = DeReplicateFromSchema<typeof TextFillMaskInputSchema>;
|
|
178
|
-
export type TextFillMaskTaskExecuteOutput = DeReplicateFromSchema<typeof TextFillMaskOutputSchema>;
|
|
179
106
|
/**
|
|
180
107
|
* Fills masked tokens in text using language models
|
|
181
108
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextFillMaskTask.d.ts","sourceRoot":"","sources":["../../src/task/TextFillMaskTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"TextFillMaskTask.d.ts","sourceRoot":"","sources":["../../src/task/TextFillMaskTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAY,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5D,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;WAC5C,WAAW,IAAI,cAAc;WAG7B,YAAY,IAAI,cAAc;CAG7C;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,qBAAqB,EAAE,SAAS,kBAAkB;;;;;;EAErF,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,YAAY,EAAE,cAAc,CAAC,qBAAqB,EAAE,sBAAsB,EAAE,kBAAkB,CAAC,CAAC;KACjG;CACF"}
|