@workglow/ai 0.0.70 → 0.0.72

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.
Files changed (35) hide show
  1. package/dist/browser.js +987 -284
  2. package/dist/browser.js.map +16 -7
  3. package/dist/bun.js +987 -284
  4. package/dist/bun.js.map +16 -7
  5. package/dist/node.js +987 -284
  6. package/dist/node.js.map +16 -7
  7. package/dist/task/BackgroundRemovalTask.d.ts +351 -0
  8. package/dist/task/BackgroundRemovalTask.d.ts.map +1 -0
  9. package/dist/task/ImageClassificationTask.d.ts +410 -0
  10. package/dist/task/ImageClassificationTask.d.ts.map +1 -0
  11. package/dist/task/ImageEmbeddingTask.d.ts +503 -0
  12. package/dist/task/ImageEmbeddingTask.d.ts.map +1 -0
  13. package/dist/task/ImageSegmentationTask.d.ts +423 -0
  14. package/dist/task/ImageSegmentationTask.d.ts.map +1 -0
  15. package/dist/task/ImageToTextTask.d.ts +355 -0
  16. package/dist/task/ImageToTextTask.d.ts.map +1 -0
  17. package/dist/task/ObjectDetectionTask.d.ts +476 -0
  18. package/dist/task/ObjectDetectionTask.d.ts.map +1 -0
  19. package/dist/task/{TextClassifierTask.d.ts → TextClassificationTask.d.ts} +27 -19
  20. package/dist/task/TextClassificationTask.d.ts.map +1 -0
  21. package/dist/task/TextFillMaskTask.d.ts +202 -0
  22. package/dist/task/TextFillMaskTask.d.ts.map +1 -0
  23. package/dist/task/TextLanguageDetectionTask.d.ts +4 -7
  24. package/dist/task/TextLanguageDetectionTask.d.ts.map +1 -1
  25. package/dist/task/TextNamedEntityRecognitionTask.d.ts +212 -0
  26. package/dist/task/TextNamedEntityRecognitionTask.d.ts.map +1 -0
  27. package/dist/task/base/AiTask.d.ts.map +1 -1
  28. package/dist/task/base/AiTaskSchemas.d.ts +153 -0
  29. package/dist/task/base/AiTaskSchemas.d.ts.map +1 -1
  30. package/dist/task/base/AiVisionTask.d.ts +33 -0
  31. package/dist/task/base/AiVisionTask.d.ts.map +1 -0
  32. package/dist/task/index.d.ts +9 -1
  33. package/dist/task/index.d.ts.map +1 -1
  34. package/package.json +9 -9
  35. package/dist/task/TextClassifierTask.d.ts.map +0 -1
@@ -0,0 +1,202 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CreateWorkflow, JobQueueTaskConfig } from "@workglow/task-graph";
7
+ import { DataPortSchema, FromSchema } from "@workglow/util";
8
+ import { AiTask } from "./base/AiTask";
9
+ import { DeReplicateFromSchema } from "./base/AiTaskSchemas";
10
+ export declare const TextFillMaskInputSchema: {
11
+ readonly type: "object";
12
+ readonly properties: {
13
+ readonly text: {
14
+ readonly "x-replicate": true;
15
+ readonly format?: string | undefined;
16
+ readonly oneOf: 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;
30
+ };
31
+ readonly model: {
32
+ readonly "x-replicate": true;
33
+ readonly format?: string | undefined;
34
+ readonly oneOf: readonly [{
35
+ readonly oneOf: readonly [{
36
+ readonly title: "Model";
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
+ };
53
+ readonly title: {
54
+ readonly type: "string";
55
+ };
56
+ readonly description: {
57
+ readonly type: "string";
58
+ };
59
+ readonly provider: {
60
+ readonly type: "string";
61
+ };
62
+ readonly providerConfig: {
63
+ readonly type: "object";
64
+ readonly default: {};
65
+ };
66
+ readonly metadata: {
67
+ readonly type: "object";
68
+ readonly default: {};
69
+ };
70
+ };
71
+ readonly required: readonly ["model_id", "tasks", "provider", "title", "description", "providerConfig", "metadata"];
72
+ readonly format: "model";
73
+ readonly additionalProperties: false;
74
+ } & {
75
+ readonly format: import(".").TypeModelSemantic;
76
+ }];
77
+ } & {
78
+ readonly format: import(".").TypeModelSemantic;
79
+ }, {
80
+ readonly type: "array";
81
+ readonly items: {
82
+ readonly oneOf: readonly [{
83
+ readonly title: "Model";
84
+ readonly description: `The model ${string}`;
85
+ } & {
86
+ readonly format: import(".").TypeModelSemantic;
87
+ readonly type: "string";
88
+ }, {
89
+ readonly type: "object";
90
+ readonly properties: {
91
+ readonly model_id: {
92
+ readonly type: "string";
93
+ };
94
+ readonly tasks: {
95
+ readonly type: "array";
96
+ readonly items: {
97
+ readonly type: "string";
98
+ };
99
+ };
100
+ readonly title: {
101
+ readonly type: "string";
102
+ };
103
+ readonly description: {
104
+ readonly type: "string";
105
+ };
106
+ readonly provider: {
107
+ readonly type: "string";
108
+ };
109
+ readonly providerConfig: {
110
+ readonly type: "object";
111
+ readonly default: {};
112
+ };
113
+ readonly metadata: {
114
+ readonly type: "object";
115
+ readonly default: {};
116
+ };
117
+ };
118
+ readonly required: readonly ["model_id", "tasks", "provider", "title", "description", "providerConfig", "metadata"];
119
+ readonly format: "model";
120
+ readonly additionalProperties: false;
121
+ } & {
122
+ readonly format: import(".").TypeModelSemantic;
123
+ }];
124
+ } & {
125
+ readonly format: import(".").TypeModelSemantic;
126
+ };
127
+ }];
128
+ readonly title: string | undefined;
129
+ readonly description: string | undefined;
130
+ };
131
+ };
132
+ readonly required: readonly ["text", "model"];
133
+ readonly additionalProperties: false;
134
+ };
135
+ export declare const TextFillMaskOutputSchema: {
136
+ readonly type: "object";
137
+ readonly properties: {
138
+ readonly predictions: {
139
+ readonly type: "array";
140
+ readonly items: {
141
+ readonly type: "object";
142
+ readonly properties: {
143
+ readonly entity: {
144
+ readonly type: "string";
145
+ readonly title: "Entity";
146
+ readonly description: "The token that was predicted to fill the mask";
147
+ };
148
+ readonly score: {
149
+ readonly type: "number";
150
+ readonly title: "Score";
151
+ readonly description: "The confidence score for this prediction";
152
+ };
153
+ readonly sequence: {
154
+ readonly type: "string";
155
+ readonly title: "Sequence";
156
+ readonly description: "The complete text with the mask filled";
157
+ };
158
+ };
159
+ readonly required: readonly ["entity", "score", "sequence"];
160
+ readonly additionalProperties: false;
161
+ };
162
+ readonly title: "Predictions";
163
+ readonly description: "The predicted tokens to fill the mask with their scores and complete sequences";
164
+ };
165
+ };
166
+ readonly required: readonly ["predictions"];
167
+ readonly additionalProperties: false;
168
+ };
169
+ export type TextFillMaskTaskInput = FromSchema<typeof TextFillMaskInputSchema>;
170
+ export type TextFillMaskTaskOutput = FromSchema<typeof TextFillMaskOutputSchema>;
171
+ export type TextFillMaskTaskExecuteInput = DeReplicateFromSchema<typeof TextFillMaskInputSchema>;
172
+ export type TextFillMaskTaskExecuteOutput = DeReplicateFromSchema<typeof TextFillMaskOutputSchema>;
173
+ /**
174
+ * Fills masked tokens in text using language models
175
+ */
176
+ export declare class TextFillMaskTask extends AiTask<TextFillMaskTaskInput, TextFillMaskTaskOutput> {
177
+ static type: string;
178
+ static category: string;
179
+ static title: string;
180
+ static description: string;
181
+ static inputSchema(): DataPortSchema;
182
+ static outputSchema(): DataPortSchema;
183
+ }
184
+ /**
185
+ * Convenience function to run fill mask tasks.
186
+ * Creates and executes a TextFillMaskTask with the provided input.
187
+ * @param input The input parameters for fill mask (text with mask token and model)
188
+ * @returns Promise resolving to the predicted tokens with scores and complete sequences
189
+ */
190
+ export declare const TextFillMask: (input: TextFillMaskTaskInput, config?: JobQueueTaskConfig) => Promise<{
191
+ predictions: {
192
+ score: number;
193
+ entity: string;
194
+ sequence: string;
195
+ }[];
196
+ }>;
197
+ declare module "@workglow/task-graph" {
198
+ interface Workflow {
199
+ TextFillMask: CreateWorkflow<TextFillMaskTaskInput, TextFillMaskTaskOutput, JobQueueTaskConfig>;
200
+ }
201
+ }
202
+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AAO,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"}
@@ -29,13 +29,10 @@ export declare const TextLanguageDetectionInputSchema: {
29
29
  readonly description: string | undefined;
30
30
  };
31
31
  readonly maxLanguages: {
32
- readonly oneOf: readonly [{
33
- readonly type: "number";
34
- readonly minimum: 1;
35
- readonly maximum: 1000;
36
- }, {
37
- readonly type: "null";
38
- }];
32
+ readonly type: "number";
33
+ readonly minimum: 0;
34
+ readonly maximum: 100;
35
+ readonly default: 5;
39
36
  readonly title: "Max Languages";
40
37
  readonly description: "The maximum number of languages to return";
41
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TextLanguageDetectionTask.d.ts","sourceRoot":"","sources":["../../src/task/TextLanguageDetectionTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAA0B,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAiC,MAAM,sBAAsB,CAAC;AAI5F,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BV,CAAC;AAEpC,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BX,CAAC;AAEpC,MAAM,MAAM,8BAA8B,GAAG,UAAU,CAAC,OAAO,gCAAgC,CAAC,CAAC;AACjG,MAAM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CAAC;AAEpC,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BX,CAAC;AAEpC,MAAM,MAAM,8BAA8B,GAAG,UAAU,CAAC,OAAO,gCAAgC,CAAC,CAAC;AACjG,MAAM,MAAM,+BAA+B,GAAG,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAAC;AACnG,MAAM,MAAM,qCAAqC,GAAG,qBAAqB,CACvE,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,sCAAsC,GAAG,qBAAqB,CACxE,OAAO,iCAAiC,CACzC,CAAC;AAEF;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,MAAM,CACnD,8BAA8B,EAC9B,+BAA+B,CAChC;IACC,OAAc,IAAI,SAA+B;IACjD,OAAc,QAAQ,SAAmB;IACzC,OAAc,KAAK,SAAwB;IAC3C,OAAc,WAAW,SAAwD;WACnE,WAAW,IAAI,cAAc;WAG7B,YAAY,IAAI,cAAc;CAG7C;AAID;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,8BAA8B,EACrC,SAAS,kBAAkB;;;;;EAG5B,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,qBAAqB,EAAE,cAAc,CACnC,8BAA8B,EAC9B,+BAA+B,EAC/B,kBAAkB,CACnB,CAAC;KACH;CACF"}
@@ -0,0 +1,212 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CreateWorkflow, JobQueueTaskConfig } from "@workglow/task-graph";
7
+ import { DataPortSchema, FromSchema } from "@workglow/util";
8
+ import { AiTask } from "./base/AiTask";
9
+ import { DeReplicateFromSchema } from "./base/AiTaskSchemas";
10
+ export declare const TextNamedEntityRecognitionInputSchema: {
11
+ readonly type: "object";
12
+ readonly properties: {
13
+ readonly text: {
14
+ readonly "x-replicate": true;
15
+ readonly format?: string | undefined;
16
+ readonly oneOf: 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;
30
+ };
31
+ readonly blockList: {
32
+ readonly type: "array";
33
+ readonly items: {
34
+ readonly type: "string";
35
+ };
36
+ readonly title: "Block List";
37
+ readonly description: "The entity types to exclude from results";
38
+ readonly "x-ui-group": "Configuration";
39
+ readonly "x-ui-group-open": false;
40
+ };
41
+ readonly model: {
42
+ readonly "x-replicate": true;
43
+ readonly format?: string | undefined;
44
+ readonly oneOf: readonly [{
45
+ readonly oneOf: readonly [{
46
+ readonly title: "Model";
47
+ readonly description: `The model ${string}`;
48
+ } & {
49
+ readonly format: import(".").TypeModelSemantic;
50
+ readonly type: "string";
51
+ }, {
52
+ readonly type: "object";
53
+ readonly properties: {
54
+ readonly model_id: {
55
+ readonly type: "string";
56
+ };
57
+ readonly tasks: {
58
+ readonly type: "array";
59
+ readonly items: {
60
+ readonly type: "string";
61
+ };
62
+ };
63
+ readonly title: {
64
+ readonly type: "string";
65
+ };
66
+ readonly description: {
67
+ readonly type: "string";
68
+ };
69
+ readonly provider: {
70
+ readonly type: "string";
71
+ };
72
+ readonly providerConfig: {
73
+ readonly type: "object";
74
+ readonly default: {};
75
+ };
76
+ readonly metadata: {
77
+ readonly type: "object";
78
+ readonly default: {};
79
+ };
80
+ };
81
+ readonly required: readonly ["model_id", "tasks", "provider", "title", "description", "providerConfig", "metadata"];
82
+ readonly format: "model";
83
+ readonly additionalProperties: false;
84
+ } & {
85
+ readonly format: import(".").TypeModelSemantic;
86
+ }];
87
+ } & {
88
+ readonly format: import(".").TypeModelSemantic;
89
+ }, {
90
+ readonly type: "array";
91
+ readonly items: {
92
+ readonly oneOf: readonly [{
93
+ readonly title: "Model";
94
+ readonly description: `The model ${string}`;
95
+ } & {
96
+ readonly format: import(".").TypeModelSemantic;
97
+ readonly type: "string";
98
+ }, {
99
+ readonly type: "object";
100
+ readonly properties: {
101
+ readonly model_id: {
102
+ readonly type: "string";
103
+ };
104
+ readonly tasks: {
105
+ readonly type: "array";
106
+ readonly items: {
107
+ readonly type: "string";
108
+ };
109
+ };
110
+ readonly title: {
111
+ readonly type: "string";
112
+ };
113
+ readonly description: {
114
+ readonly type: "string";
115
+ };
116
+ readonly provider: {
117
+ readonly type: "string";
118
+ };
119
+ readonly providerConfig: {
120
+ readonly type: "object";
121
+ readonly default: {};
122
+ };
123
+ readonly metadata: {
124
+ readonly type: "object";
125
+ readonly default: {};
126
+ };
127
+ };
128
+ readonly required: readonly ["model_id", "tasks", "provider", "title", "description", "providerConfig", "metadata"];
129
+ readonly format: "model";
130
+ readonly additionalProperties: false;
131
+ } & {
132
+ readonly format: import(".").TypeModelSemantic;
133
+ }];
134
+ } & {
135
+ readonly format: import(".").TypeModelSemantic;
136
+ };
137
+ }];
138
+ readonly title: string | undefined;
139
+ readonly description: string | undefined;
140
+ };
141
+ };
142
+ readonly required: readonly ["text", "model"];
143
+ readonly additionalProperties: false;
144
+ };
145
+ export declare const TextNamedEntityRecognitionOutputSchema: {
146
+ readonly type: "object";
147
+ readonly properties: {
148
+ readonly entities: {
149
+ readonly type: "array";
150
+ readonly items: {
151
+ readonly type: "object";
152
+ readonly properties: {
153
+ readonly entity: {
154
+ readonly type: "string";
155
+ readonly title: "Entity";
156
+ readonly description: "The type of the named entity";
157
+ };
158
+ readonly score: {
159
+ readonly type: "number";
160
+ readonly title: "Score";
161
+ readonly description: "The confidence score for this entity";
162
+ };
163
+ readonly word: {
164
+ readonly type: "string";
165
+ readonly title: "Word";
166
+ readonly description: "The extracted text of the named entity";
167
+ };
168
+ };
169
+ readonly required: readonly ["entity", "score", "word"];
170
+ readonly additionalProperties: false;
171
+ };
172
+ readonly title: "Entities";
173
+ readonly description: "The extracted named entities with their types, scores, and text";
174
+ };
175
+ };
176
+ readonly required: readonly ["entities"];
177
+ readonly additionalProperties: false;
178
+ };
179
+ export type TextNamedEntityRecognitionTaskInput = FromSchema<typeof TextNamedEntityRecognitionInputSchema>;
180
+ export type TextNamedEntityRecognitionTaskOutput = FromSchema<typeof TextNamedEntityRecognitionOutputSchema>;
181
+ export type TextNamedEntityRecognitionTaskExecuteInput = DeReplicateFromSchema<typeof TextNamedEntityRecognitionInputSchema>;
182
+ export type TextNamedEntityRecognitionTaskExecuteOutput = DeReplicateFromSchema<typeof TextNamedEntityRecognitionOutputSchema>;
183
+ /**
184
+ * Extracts named entities from text using language models
185
+ */
186
+ export declare class TextNamedEntityRecognitionTask extends AiTask<TextNamedEntityRecognitionTaskInput, TextNamedEntityRecognitionTaskOutput> {
187
+ static type: string;
188
+ static category: string;
189
+ static title: string;
190
+ static description: string;
191
+ static inputSchema(): DataPortSchema;
192
+ static outputSchema(): DataPortSchema;
193
+ }
194
+ /**
195
+ * Convenience function to run named entity recognition tasks.
196
+ * Creates and executes a TextNamedEntityRecognitionTask with the provided input.
197
+ * @param input The input parameters for named entity recognition (text and model)
198
+ * @returns Promise resolving to the extracted named entities with types, scores, and text
199
+ */
200
+ export declare const TextNamedEntityRecognition: (input: TextNamedEntityRecognitionTaskInput, config?: JobQueueTaskConfig) => Promise<{
201
+ entities: {
202
+ score: number;
203
+ entity: string;
204
+ word: string;
205
+ }[];
206
+ }>;
207
+ declare module "@workglow/task-graph" {
208
+ interface Workflow {
209
+ TextNamedEntityRecognition: CreateWorkflow<TextNamedEntityRecognitionTaskInput, TextNamedEntityRecognitionTaskOutput, JobQueueTaskConfig>;
210
+ }
211
+ }
212
+ //# sourceMappingURL=TextNamedEntityRecognitionTask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextNamedEntityRecognitionTask.d.ts","sourceRoot":"","sources":["../../src/task/TextNamedEntityRecognitionTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAA0B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;OAKG;cACsB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAqB9E;;;;;OAKG;IACY,SAAS,CACtB,KAAK,EAAE,KAAK,EACZ,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC;cAc1B,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC;cAcvD,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAQvF;;;;;OAKG;IACG,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;IAiD7C,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;CA2BhD"}
@@ -234,5 +234,158 @@ export type DeReplicateFromSchema<S extends {
234
234
  "x-replicate": true;
235
235
  } ? UnwrapArrayUnion<TypedArrayFromSchema<S["properties"][K]>> : TypedArrayFromSchema<S["properties"][K]>;
236
236
  };
237
+ export type ImageSource = ImageBitmap | OffscreenCanvas | VideoFrame;
238
+ /**
239
+ * Image input schema supporting URIs and base64-encoded images in multiple formats
240
+ */
241
+ export declare const TypeImageInput: {
242
+ readonly oneOf: readonly [{
243
+ readonly type: "string";
244
+ readonly title: "Image Data";
245
+ readonly description: "Image as data-uri";
246
+ }, {
247
+ readonly type: "object";
248
+ readonly additionalProperties: false;
249
+ readonly properties: {
250
+ readonly data: {
251
+ readonly oneOf: readonly [{
252
+ readonly type: "object";
253
+ readonly format: "image:ImageBitmap";
254
+ readonly title: "ImageBitmap";
255
+ }, {
256
+ readonly type: "object";
257
+ readonly format: "image:OffscreenCanvas";
258
+ readonly title: "OffscreenCanvas";
259
+ }, {
260
+ readonly type: "object";
261
+ readonly format: "image:VideoFrame";
262
+ readonly title: "VideoFrame";
263
+ }, {
264
+ readonly type: "object";
265
+ readonly properties: {
266
+ readonly data: {
267
+ readonly type: "array";
268
+ readonly items: {
269
+ readonly type: "number";
270
+ readonly format: "Uint8Clamped";
271
+ };
272
+ readonly format: "Uint8ClampedArray";
273
+ readonly title: "Data";
274
+ readonly description: "Data of the image";
275
+ };
276
+ readonly width: {
277
+ readonly type: "number";
278
+ readonly title: "Width";
279
+ readonly description: "Width of the image";
280
+ };
281
+ readonly height: {
282
+ readonly type: "number";
283
+ readonly title: "Height";
284
+ readonly description: "Height of the image";
285
+ };
286
+ readonly channels: {
287
+ readonly type: "number";
288
+ readonly title: "Channels";
289
+ readonly description: "Channels of the image";
290
+ };
291
+ readonly rawChannels: {
292
+ readonly type: "number";
293
+ readonly title: "Raw Channels";
294
+ readonly description: "Raw channels of the image";
295
+ };
296
+ };
297
+ readonly additionalProperties: false;
298
+ readonly required: readonly ["data", "width", "height", "channels"];
299
+ readonly format: "image:ImageBinary";
300
+ readonly title: "ImageBinary";
301
+ }];
302
+ };
303
+ readonly width: {
304
+ readonly type: "number";
305
+ readonly title: "Width";
306
+ readonly description: "Width of the image";
307
+ };
308
+ readonly height: {
309
+ readonly type: "number";
310
+ readonly title: "Height";
311
+ readonly description: "Height of the image";
312
+ };
313
+ readonly channels: {
314
+ readonly type: "number";
315
+ readonly title: "Channels";
316
+ readonly description: "Channels of the image";
317
+ readonly minimum: 1;
318
+ readonly maximum: 4;
319
+ };
320
+ };
321
+ readonly required: readonly ["data", "width", "height", "channels"];
322
+ }];
323
+ readonly title: "Image";
324
+ readonly description: "Image as URL or base64-encoded data";
325
+ };
326
+ /**
327
+ * Audio input schema supporting URIs and base64-encoded audio in multiple formats
328
+ */
329
+ export declare const TypeAudioInput: {
330
+ readonly type: "string";
331
+ readonly title: "Audio";
332
+ readonly description: "Audio as data-uri, or Blob";
333
+ };
334
+ /**
335
+ * Bounding box coordinates
336
+ */
337
+ export declare const TypeBoundingBox: {
338
+ readonly type: "object";
339
+ readonly properties: {
340
+ readonly x: {
341
+ readonly type: "number";
342
+ readonly title: "X coordinate";
343
+ readonly description: "Left edge of the bounding box";
344
+ };
345
+ readonly y: {
346
+ readonly type: "number";
347
+ readonly title: "Y coordinate";
348
+ readonly description: "Top edge of the bounding box";
349
+ };
350
+ readonly width: {
351
+ readonly type: "number";
352
+ readonly title: "Width";
353
+ readonly description: "Width of the bounding box";
354
+ };
355
+ readonly height: {
356
+ readonly type: "number";
357
+ readonly title: "Height";
358
+ readonly description: "Height of the bounding box";
359
+ };
360
+ };
361
+ readonly required: readonly ["x", "y", "width", "height"];
362
+ readonly additionalProperties: false;
363
+ readonly title: "Bounding Box";
364
+ readonly description: "Bounding box coordinates";
365
+ };
366
+ /**
367
+ * Classification category with label and confidence score
368
+ */
369
+ export declare const TypeCategory: {
370
+ readonly type: "object";
371
+ readonly properties: {
372
+ readonly label: {
373
+ readonly type: "string";
374
+ readonly title: "Label";
375
+ readonly description: "Category label";
376
+ };
377
+ readonly score: {
378
+ readonly type: "number";
379
+ readonly title: "Confidence Score";
380
+ readonly description: "Confidence score between 0 and 1";
381
+ readonly minimum: 0;
382
+ readonly maximum: 1;
383
+ };
384
+ };
385
+ readonly required: readonly ["label", "score"];
386
+ readonly additionalProperties: false;
387
+ readonly title: "Category";
388
+ readonly description: "Classification category with label and score";
389
+ };
237
390
  export {};
238
391
  //# sourceMappingURL=AiTaskSchemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AiTaskSchemas.d.ts","sourceRoot":"","sources":["../../../src/task/base/AiTaskSchemas.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,wBAAwB,EACxB,UAAU,EAGV,UAAU,EACX,MAAM,gBAAgB,CAAC;AAGxB,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,UAAU,GACV,SAAS,GACT,WAAW,GACX,WAAW,GACX,UAAU,GACV,iBAAiB,CAAC;AAKtB,QAAA,MAAM,uBAAuB;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;CAYG,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;CAgBM,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @description This file contains the implementation of the JobQueueTask class and its derived classes.
8
+ */
9
+ import { JobQueueTaskConfig, TaskInput, type TaskOutput } from "@workglow/task-graph";
10
+ import { AiJobInput } from "../../job/AiJob";
11
+ import type { ModelRecord } from "../../model/ModelSchema";
12
+ import { AiTask } from "./AiTask";
13
+ export interface AiVisionTaskSingleInput extends TaskInput {
14
+ model: string;
15
+ }
16
+ export interface AiVisionArrayTaskInput extends TaskInput {
17
+ model: string | ModelRecord | (string | ModelRecord)[];
18
+ }
19
+ /**
20
+ * A base class for AI related tasks that run in a job queue.
21
+ * Extends the JobQueueTask class to provide LLM-specific functionality.
22
+ */
23
+ export declare class AiVisionTask<Input extends AiVisionArrayTaskInput = AiVisionArrayTaskInput, Output extends TaskOutput = TaskOutput, Config extends JobQueueTaskConfig = JobQueueTaskConfig> extends AiTask<Input, Output, Config> {
24
+ static type: string;
25
+ /**
26
+ * Get the input to submit to the job queue.
27
+ * Transforms the task input to AiJobInput format.
28
+ * @param input - The task input
29
+ * @returns The AiJobInput to submit to the queue
30
+ */
31
+ protected getJobInput(input: Input): Promise<AiJobInput<Input>>;
32
+ }
33
+ //# sourceMappingURL=AiVisionTask.d.ts.map