@workglow/ai 0.0.85 → 0.0.86
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 +3947 -1449
- package/dist/browser.js.map +49 -38
- package/dist/bun.js +3947 -1449
- package/dist/bun.js.map +49 -38
- 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/node.js +3947 -1449
- package/dist/node.js.map +49 -38
- 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 +79 -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 +79 -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 +3 -127
- 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,299 +4,146 @@
|
|
|
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";
|
|
8
|
-
import { DeReplicateFromSchema } from "./base/AiTaskSchemas";
|
|
7
|
+
import { DataPortSchema, FromSchema, TypedArraySchemaOptions } from "@workglow/util";
|
|
9
8
|
import { AiVisionTask } from "./base/AiVisionTask";
|
|
10
9
|
export declare const ImageEmbeddingInputSchema: {
|
|
11
10
|
readonly type: "object";
|
|
12
11
|
readonly properties: {
|
|
13
12
|
readonly image: {
|
|
14
|
-
readonly "x-replicate": true;
|
|
15
|
-
readonly format?: string | undefined;
|
|
16
13
|
readonly oneOf: readonly [{
|
|
17
|
-
readonly
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
readonly
|
|
42
|
-
readonly
|
|
43
|
-
|
|
44
|
-
readonly items: {
|
|
45
|
-
readonly type: "number";
|
|
46
|
-
readonly format: "Uint8Clamped";
|
|
47
|
-
};
|
|
48
|
-
readonly format: "Uint8ClampedArray";
|
|
49
|
-
readonly title: "Data";
|
|
50
|
-
readonly description: "Data of the image";
|
|
51
|
-
};
|
|
52
|
-
readonly width: {
|
|
53
|
-
readonly type: "number";
|
|
54
|
-
readonly title: "Width";
|
|
55
|
-
readonly description: "Width of the image";
|
|
56
|
-
};
|
|
57
|
-
readonly height: {
|
|
58
|
-
readonly type: "number";
|
|
59
|
-
readonly title: "Height";
|
|
60
|
-
readonly description: "Height of the image";
|
|
61
|
-
};
|
|
62
|
-
readonly channels: {
|
|
63
|
-
readonly type: "number";
|
|
64
|
-
readonly title: "Channels";
|
|
65
|
-
readonly description: "Channels of the image";
|
|
66
|
-
};
|
|
67
|
-
readonly rawChannels: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly title: "Image Data";
|
|
16
|
+
readonly description: "Image as data-uri";
|
|
17
|
+
readonly format: "image:data-uri";
|
|
18
|
+
}, {
|
|
19
|
+
readonly type: "object";
|
|
20
|
+
readonly additionalProperties: false;
|
|
21
|
+
readonly properties: {
|
|
22
|
+
readonly data: {
|
|
23
|
+
readonly oneOf: readonly [{
|
|
24
|
+
readonly type: "object";
|
|
25
|
+
readonly format: "image:ImageBitmap";
|
|
26
|
+
readonly title: "ImageBitmap";
|
|
27
|
+
}, {
|
|
28
|
+
readonly type: "object";
|
|
29
|
+
readonly format: "image:OffscreenCanvas";
|
|
30
|
+
readonly title: "OffscreenCanvas";
|
|
31
|
+
}, {
|
|
32
|
+
readonly type: "object";
|
|
33
|
+
readonly format: "image:VideoFrame";
|
|
34
|
+
readonly title: "VideoFrame";
|
|
35
|
+
}, {
|
|
36
|
+
readonly type: "object";
|
|
37
|
+
readonly properties: {
|
|
38
|
+
readonly data: {
|
|
39
|
+
readonly type: "array";
|
|
40
|
+
readonly items: {
|
|
68
41
|
readonly type: "number";
|
|
69
|
-
readonly
|
|
70
|
-
readonly description: "Raw channels of the image";
|
|
42
|
+
readonly format: "Uint8Clamped";
|
|
71
43
|
};
|
|
44
|
+
readonly format: "Uint8ClampedArray";
|
|
45
|
+
readonly title: "Data";
|
|
46
|
+
readonly description: "Data of the image";
|
|
47
|
+
};
|
|
48
|
+
readonly width: {
|
|
49
|
+
readonly type: "number";
|
|
50
|
+
readonly title: "Width";
|
|
51
|
+
readonly description: "Width of the image";
|
|
52
|
+
};
|
|
53
|
+
readonly height: {
|
|
54
|
+
readonly type: "number";
|
|
55
|
+
readonly title: "Height";
|
|
56
|
+
readonly description: "Height of the image";
|
|
57
|
+
};
|
|
58
|
+
readonly channels: {
|
|
59
|
+
readonly type: "number";
|
|
60
|
+
readonly title: "Channels";
|
|
61
|
+
readonly description: "Channels of the image";
|
|
62
|
+
};
|
|
63
|
+
readonly rawChannels: {
|
|
64
|
+
readonly type: "number";
|
|
65
|
+
readonly title: "Raw Channels";
|
|
66
|
+
readonly description: "Raw channels of the image";
|
|
72
67
|
};
|
|
73
|
-
readonly additionalProperties: false;
|
|
74
|
-
readonly required: readonly ["data", "width", "height", "channels"];
|
|
75
|
-
readonly format: "image:ImageBinary";
|
|
76
|
-
readonly title: "ImageBinary";
|
|
77
|
-
}];
|
|
78
|
-
};
|
|
79
|
-
readonly width: {
|
|
80
|
-
readonly type: "number";
|
|
81
|
-
readonly title: "Width";
|
|
82
|
-
readonly description: "Width of the image";
|
|
83
|
-
};
|
|
84
|
-
readonly height: {
|
|
85
|
-
readonly type: "number";
|
|
86
|
-
readonly title: "Height";
|
|
87
|
-
readonly description: "Height of the image";
|
|
88
|
-
};
|
|
89
|
-
readonly channels: {
|
|
90
|
-
readonly type: "number";
|
|
91
|
-
readonly title: "Channels";
|
|
92
|
-
readonly description: "Channels of the image";
|
|
93
|
-
readonly minimum: 1;
|
|
94
|
-
readonly maximum: 4;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
readonly required: readonly ["data", "width", "height", "channels"];
|
|
98
|
-
}];
|
|
99
|
-
readonly title: "Image";
|
|
100
|
-
readonly format: "image";
|
|
101
|
-
readonly description: "Image as URL or base64-encoded data";
|
|
102
|
-
}, {
|
|
103
|
-
readonly type: "array";
|
|
104
|
-
readonly items: {
|
|
105
|
-
readonly oneOf: readonly [{
|
|
106
|
-
readonly type: "string";
|
|
107
|
-
readonly title: "Image Data";
|
|
108
|
-
readonly description: "Image as data-uri";
|
|
109
|
-
readonly format: "image:data-uri";
|
|
110
|
-
}, {
|
|
111
|
-
readonly type: "object";
|
|
112
|
-
readonly additionalProperties: false;
|
|
113
|
-
readonly properties: {
|
|
114
|
-
readonly data: {
|
|
115
|
-
readonly oneOf: readonly [{
|
|
116
|
-
readonly type: "object";
|
|
117
|
-
readonly format: "image:ImageBitmap";
|
|
118
|
-
readonly title: "ImageBitmap";
|
|
119
|
-
}, {
|
|
120
|
-
readonly type: "object";
|
|
121
|
-
readonly format: "image:OffscreenCanvas";
|
|
122
|
-
readonly title: "OffscreenCanvas";
|
|
123
|
-
}, {
|
|
124
|
-
readonly type: "object";
|
|
125
|
-
readonly format: "image:VideoFrame";
|
|
126
|
-
readonly title: "VideoFrame";
|
|
127
|
-
}, {
|
|
128
|
-
readonly type: "object";
|
|
129
|
-
readonly properties: {
|
|
130
|
-
readonly data: {
|
|
131
|
-
readonly type: "array";
|
|
132
|
-
readonly items: {
|
|
133
|
-
readonly type: "number";
|
|
134
|
-
readonly format: "Uint8Clamped";
|
|
135
|
-
};
|
|
136
|
-
readonly format: "Uint8ClampedArray";
|
|
137
|
-
readonly title: "Data";
|
|
138
|
-
readonly description: "Data of the image";
|
|
139
|
-
};
|
|
140
|
-
readonly width: {
|
|
141
|
-
readonly type: "number";
|
|
142
|
-
readonly title: "Width";
|
|
143
|
-
readonly description: "Width of the image";
|
|
144
|
-
};
|
|
145
|
-
readonly height: {
|
|
146
|
-
readonly type: "number";
|
|
147
|
-
readonly title: "Height";
|
|
148
|
-
readonly description: "Height of the image";
|
|
149
|
-
};
|
|
150
|
-
readonly channels: {
|
|
151
|
-
readonly type: "number";
|
|
152
|
-
readonly title: "Channels";
|
|
153
|
-
readonly description: "Channels of the image";
|
|
154
|
-
};
|
|
155
|
-
readonly rawChannels: {
|
|
156
|
-
readonly type: "number";
|
|
157
|
-
readonly title: "Raw Channels";
|
|
158
|
-
readonly description: "Raw channels of the image";
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
readonly additionalProperties: false;
|
|
162
|
-
readonly required: readonly ["data", "width", "height", "channels"];
|
|
163
|
-
readonly format: "image:ImageBinary";
|
|
164
|
-
readonly title: "ImageBinary";
|
|
165
|
-
}];
|
|
166
|
-
};
|
|
167
|
-
readonly width: {
|
|
168
|
-
readonly type: "number";
|
|
169
|
-
readonly title: "Width";
|
|
170
|
-
readonly description: "Width of the image";
|
|
171
|
-
};
|
|
172
|
-
readonly height: {
|
|
173
|
-
readonly type: "number";
|
|
174
|
-
readonly title: "Height";
|
|
175
|
-
readonly description: "Height of the image";
|
|
176
|
-
};
|
|
177
|
-
readonly channels: {
|
|
178
|
-
readonly type: "number";
|
|
179
|
-
readonly title: "Channels";
|
|
180
|
-
readonly description: "Channels of the image";
|
|
181
|
-
readonly minimum: 1;
|
|
182
|
-
readonly maximum: 4;
|
|
183
68
|
};
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
69
|
+
readonly additionalProperties: false;
|
|
70
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
71
|
+
readonly format: "image:ImageBinary";
|
|
72
|
+
readonly title: "ImageBinary";
|
|
73
|
+
}];
|
|
74
|
+
};
|
|
75
|
+
readonly width: {
|
|
76
|
+
readonly type: "number";
|
|
77
|
+
readonly title: "Width";
|
|
78
|
+
readonly description: "Width of the image";
|
|
79
|
+
};
|
|
80
|
+
readonly height: {
|
|
81
|
+
readonly type: "number";
|
|
82
|
+
readonly title: "Height";
|
|
83
|
+
readonly description: "Height of the image";
|
|
84
|
+
};
|
|
85
|
+
readonly channels: {
|
|
86
|
+
readonly type: "number";
|
|
87
|
+
readonly title: "Channels";
|
|
88
|
+
readonly description: "Channels of the image";
|
|
89
|
+
readonly minimum: 1;
|
|
90
|
+
readonly maximum: 4;
|
|
91
|
+
};
|
|
190
92
|
};
|
|
93
|
+
readonly required: readonly ["data", "width", "height", "channels"];
|
|
191
94
|
}];
|
|
192
|
-
readonly title:
|
|
193
|
-
readonly
|
|
95
|
+
readonly title: "Image";
|
|
96
|
+
readonly format: "image";
|
|
97
|
+
readonly description: "Image as URL or base64-encoded data";
|
|
194
98
|
};
|
|
195
99
|
readonly model: {
|
|
196
|
-
readonly "x-replicate": true;
|
|
197
|
-
readonly format?: string | undefined;
|
|
198
100
|
readonly oneOf: readonly [{
|
|
199
|
-
readonly
|
|
200
|
-
|
|
201
|
-
readonly description: `The model ${string}`;
|
|
202
|
-
} & {
|
|
203
|
-
readonly format: import(".").TypeModelSemantic;
|
|
204
|
-
readonly type: "string";
|
|
205
|
-
}, {
|
|
206
|
-
readonly type: "object";
|
|
207
|
-
readonly properties: {
|
|
208
|
-
readonly model_id: {
|
|
209
|
-
readonly type: "string";
|
|
210
|
-
};
|
|
211
|
-
readonly tasks: {
|
|
212
|
-
readonly type: "array";
|
|
213
|
-
readonly items: {
|
|
214
|
-
readonly type: "string";
|
|
215
|
-
};
|
|
216
|
-
readonly "x-ui-editor": "multiselect";
|
|
217
|
-
};
|
|
218
|
-
readonly title: {
|
|
219
|
-
readonly type: "string";
|
|
220
|
-
};
|
|
221
|
-
readonly description: {
|
|
222
|
-
readonly type: "string";
|
|
223
|
-
readonly "x-ui-editor": "textarea";
|
|
224
|
-
};
|
|
225
|
-
readonly provider: {
|
|
226
|
-
readonly type: "string";
|
|
227
|
-
};
|
|
228
|
-
readonly provider_config: {
|
|
229
|
-
readonly type: "object";
|
|
230
|
-
readonly default: {};
|
|
231
|
-
};
|
|
232
|
-
readonly metadata: {
|
|
233
|
-
readonly type: "object";
|
|
234
|
-
readonly default: {};
|
|
235
|
-
readonly "x-ui-hidden": true;
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
readonly required: readonly ["provider", "provider_config"];
|
|
239
|
-
readonly format: "model";
|
|
240
|
-
readonly additionalProperties: false;
|
|
241
|
-
} & {
|
|
242
|
-
readonly format: import(".").TypeModelSemantic;
|
|
243
|
-
}];
|
|
101
|
+
readonly title: "Model";
|
|
102
|
+
readonly description: `The model ${string}`;
|
|
244
103
|
} & {
|
|
245
104
|
readonly format: import(".").TypeModelSemantic;
|
|
105
|
+
readonly type: "string";
|
|
246
106
|
}, {
|
|
247
|
-
readonly type: "
|
|
248
|
-
readonly
|
|
249
|
-
readonly
|
|
250
|
-
readonly title: "Model";
|
|
251
|
-
readonly description: `The model ${string}`;
|
|
252
|
-
} & {
|
|
253
|
-
readonly format: import(".").TypeModelSemantic;
|
|
107
|
+
readonly type: "object";
|
|
108
|
+
readonly properties: {
|
|
109
|
+
readonly model_id: {
|
|
254
110
|
readonly type: "string";
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
readonly
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
};
|
|
261
|
-
readonly tasks: {
|
|
262
|
-
readonly type: "array";
|
|
263
|
-
readonly items: {
|
|
264
|
-
readonly type: "string";
|
|
265
|
-
};
|
|
266
|
-
readonly "x-ui-editor": "multiselect";
|
|
267
|
-
};
|
|
268
|
-
readonly title: {
|
|
269
|
-
readonly type: "string";
|
|
270
|
-
};
|
|
271
|
-
readonly description: {
|
|
272
|
-
readonly type: "string";
|
|
273
|
-
readonly "x-ui-editor": "textarea";
|
|
274
|
-
};
|
|
275
|
-
readonly provider: {
|
|
276
|
-
readonly type: "string";
|
|
277
|
-
};
|
|
278
|
-
readonly provider_config: {
|
|
279
|
-
readonly type: "object";
|
|
280
|
-
readonly default: {};
|
|
281
|
-
};
|
|
282
|
-
readonly metadata: {
|
|
283
|
-
readonly type: "object";
|
|
284
|
-
readonly default: {};
|
|
285
|
-
readonly "x-ui-hidden": true;
|
|
286
|
-
};
|
|
111
|
+
};
|
|
112
|
+
readonly tasks: {
|
|
113
|
+
readonly type: "array";
|
|
114
|
+
readonly items: {
|
|
115
|
+
readonly type: "string";
|
|
287
116
|
};
|
|
288
|
-
readonly
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
117
|
+
readonly "x-ui-editor": "multiselect";
|
|
118
|
+
};
|
|
119
|
+
readonly title: {
|
|
120
|
+
readonly type: "string";
|
|
121
|
+
};
|
|
122
|
+
readonly description: {
|
|
123
|
+
readonly type: "string";
|
|
124
|
+
readonly "x-ui-editor": "textarea";
|
|
125
|
+
};
|
|
126
|
+
readonly provider: {
|
|
127
|
+
readonly type: "string";
|
|
128
|
+
};
|
|
129
|
+
readonly provider_config: {
|
|
130
|
+
readonly type: "object";
|
|
131
|
+
readonly default: {};
|
|
132
|
+
};
|
|
133
|
+
readonly metadata: {
|
|
134
|
+
readonly type: "object";
|
|
135
|
+
readonly default: {};
|
|
136
|
+
readonly "x-ui-hidden": true;
|
|
137
|
+
};
|
|
296
138
|
};
|
|
139
|
+
readonly required: readonly ["provider", "provider_config"];
|
|
140
|
+
readonly format: "model";
|
|
141
|
+
readonly additionalProperties: false;
|
|
142
|
+
} & {
|
|
143
|
+
readonly format: import(".").TypeModelSemantic;
|
|
297
144
|
}];
|
|
298
|
-
|
|
299
|
-
readonly
|
|
145
|
+
} & {
|
|
146
|
+
readonly format: import(".").TypeModelSemantic;
|
|
300
147
|
};
|
|
301
148
|
};
|
|
302
149
|
readonly required: readonly ["image", "model"];
|
|
@@ -306,185 +153,17 @@ export declare const ImageEmbeddingOutputSchema: {
|
|
|
306
153
|
readonly type: "object";
|
|
307
154
|
readonly properties: {
|
|
308
155
|
readonly vector: {
|
|
309
|
-
readonly
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
readonly type: "number";
|
|
314
|
-
readonly format: "Float64";
|
|
315
|
-
};
|
|
316
|
-
readonly title: "Float64Array";
|
|
317
|
-
readonly description: "A 64-bit floating point array";
|
|
318
|
-
readonly format: "Float64Array";
|
|
319
|
-
}, {
|
|
320
|
-
readonly type: "array";
|
|
321
|
-
readonly items: {
|
|
322
|
-
readonly type: "number";
|
|
323
|
-
readonly format: "Float32";
|
|
324
|
-
};
|
|
325
|
-
readonly title: "Float32Array";
|
|
326
|
-
readonly description: "A 32-bit floating point array";
|
|
327
|
-
readonly format: "Float32Array";
|
|
328
|
-
}, {
|
|
329
|
-
readonly type: "array";
|
|
330
|
-
readonly items: {
|
|
331
|
-
readonly type: "number";
|
|
332
|
-
readonly format: "Int32";
|
|
333
|
-
};
|
|
334
|
-
readonly title: "Int32Array";
|
|
335
|
-
readonly description: "A 32-bit integer array";
|
|
336
|
-
readonly format: "Int32Array";
|
|
337
|
-
}, {
|
|
338
|
-
readonly type: "array";
|
|
339
|
-
readonly items: {
|
|
340
|
-
readonly type: "number";
|
|
341
|
-
readonly format: "Int16";
|
|
342
|
-
};
|
|
343
|
-
readonly title: "Int16Array";
|
|
344
|
-
readonly description: "A 16-bit integer array";
|
|
345
|
-
readonly format: "Int16Array";
|
|
346
|
-
}, {
|
|
347
|
-
readonly type: "array";
|
|
348
|
-
readonly items: {
|
|
349
|
-
readonly type: "number";
|
|
350
|
-
readonly format: "Int8";
|
|
351
|
-
};
|
|
352
|
-
readonly title: "Int8Array";
|
|
353
|
-
}, {
|
|
354
|
-
readonly type: "array";
|
|
355
|
-
readonly items: {
|
|
356
|
-
readonly type: "number";
|
|
357
|
-
readonly format: "Uint8";
|
|
358
|
-
};
|
|
359
|
-
readonly title: "Uint8Array";
|
|
360
|
-
readonly description: "A 8-bit unsigned integer array";
|
|
361
|
-
readonly format: "Uint8Array";
|
|
362
|
-
}, {
|
|
363
|
-
readonly type: "array";
|
|
364
|
-
readonly items: {
|
|
365
|
-
readonly type: "number";
|
|
366
|
-
readonly format: "Uint16";
|
|
367
|
-
};
|
|
368
|
-
readonly title: "Uint16Array";
|
|
369
|
-
readonly description: "A 16-bit unsigned integer array";
|
|
370
|
-
readonly format: "Uint16Array";
|
|
371
|
-
}, {
|
|
372
|
-
readonly type: "array";
|
|
373
|
-
readonly items: {
|
|
374
|
-
readonly type: "number";
|
|
375
|
-
readonly format: "Uint32";
|
|
376
|
-
};
|
|
377
|
-
readonly title: "Uint32Array";
|
|
378
|
-
readonly description: "A 32-bit unsigned integer array";
|
|
379
|
-
readonly format: "Uint32Array";
|
|
380
|
-
}, {
|
|
381
|
-
readonly type: "array";
|
|
382
|
-
readonly items: {
|
|
383
|
-
readonly type: "number";
|
|
384
|
-
readonly format: "Uint8Clamped";
|
|
385
|
-
};
|
|
386
|
-
readonly title: "Uint8ClampedArray";
|
|
387
|
-
readonly description: "A 8-bit unsigned integer array with values clamped to 0-255";
|
|
388
|
-
readonly format: "Uint8ClampedArray";
|
|
389
|
-
}];
|
|
390
|
-
readonly format: "TypedArray";
|
|
391
|
-
}, {
|
|
392
|
-
readonly type: "array";
|
|
393
|
-
readonly items: {
|
|
394
|
-
readonly oneOf: readonly [{
|
|
395
|
-
readonly type: "array";
|
|
396
|
-
readonly items: {
|
|
397
|
-
readonly type: "number";
|
|
398
|
-
readonly format: "Float64";
|
|
399
|
-
};
|
|
400
|
-
readonly title: "Float64Array";
|
|
401
|
-
readonly description: "A 64-bit floating point array";
|
|
402
|
-
readonly format: "Float64Array";
|
|
403
|
-
}, {
|
|
404
|
-
readonly type: "array";
|
|
405
|
-
readonly items: {
|
|
406
|
-
readonly type: "number";
|
|
407
|
-
readonly format: "Float32";
|
|
408
|
-
};
|
|
409
|
-
readonly title: "Float32Array";
|
|
410
|
-
readonly description: "A 32-bit floating point array";
|
|
411
|
-
readonly format: "Float32Array";
|
|
412
|
-
}, {
|
|
413
|
-
readonly type: "array";
|
|
414
|
-
readonly items: {
|
|
415
|
-
readonly type: "number";
|
|
416
|
-
readonly format: "Int32";
|
|
417
|
-
};
|
|
418
|
-
readonly title: "Int32Array";
|
|
419
|
-
readonly description: "A 32-bit integer array";
|
|
420
|
-
readonly format: "Int32Array";
|
|
421
|
-
}, {
|
|
422
|
-
readonly type: "array";
|
|
423
|
-
readonly items: {
|
|
424
|
-
readonly type: "number";
|
|
425
|
-
readonly format: "Int16";
|
|
426
|
-
};
|
|
427
|
-
readonly title: "Int16Array";
|
|
428
|
-
readonly description: "A 16-bit integer array";
|
|
429
|
-
readonly format: "Int16Array";
|
|
430
|
-
}, {
|
|
431
|
-
readonly type: "array";
|
|
432
|
-
readonly items: {
|
|
433
|
-
readonly type: "number";
|
|
434
|
-
readonly format: "Int8";
|
|
435
|
-
};
|
|
436
|
-
readonly title: "Int8Array";
|
|
437
|
-
}, {
|
|
438
|
-
readonly type: "array";
|
|
439
|
-
readonly items: {
|
|
440
|
-
readonly type: "number";
|
|
441
|
-
readonly format: "Uint8";
|
|
442
|
-
};
|
|
443
|
-
readonly title: "Uint8Array";
|
|
444
|
-
readonly description: "A 8-bit unsigned integer array";
|
|
445
|
-
readonly format: "Uint8Array";
|
|
446
|
-
}, {
|
|
447
|
-
readonly type: "array";
|
|
448
|
-
readonly items: {
|
|
449
|
-
readonly type: "number";
|
|
450
|
-
readonly format: "Uint16";
|
|
451
|
-
};
|
|
452
|
-
readonly title: "Uint16Array";
|
|
453
|
-
readonly description: "A 16-bit unsigned integer array";
|
|
454
|
-
readonly format: "Uint16Array";
|
|
455
|
-
}, {
|
|
456
|
-
readonly type: "array";
|
|
457
|
-
readonly items: {
|
|
458
|
-
readonly type: "number";
|
|
459
|
-
readonly format: "Uint32";
|
|
460
|
-
};
|
|
461
|
-
readonly title: "Uint32Array";
|
|
462
|
-
readonly description: "A 32-bit unsigned integer array";
|
|
463
|
-
readonly format: "Uint32Array";
|
|
464
|
-
}, {
|
|
465
|
-
readonly type: "array";
|
|
466
|
-
readonly items: {
|
|
467
|
-
readonly type: "number";
|
|
468
|
-
readonly format: "Uint8Clamped";
|
|
469
|
-
};
|
|
470
|
-
readonly title: "Uint8ClampedArray";
|
|
471
|
-
readonly description: "A 8-bit unsigned integer array with values clamped to 0-255";
|
|
472
|
-
readonly format: "Uint8ClampedArray";
|
|
473
|
-
}];
|
|
474
|
-
readonly format: "TypedArray";
|
|
475
|
-
};
|
|
476
|
-
}];
|
|
477
|
-
readonly title: "Embedding";
|
|
478
|
-
readonly description: "The image embedding vector";
|
|
156
|
+
readonly type: "array";
|
|
157
|
+
readonly format: "TypedArray";
|
|
158
|
+
readonly title: "Typed Array";
|
|
159
|
+
readonly description: "A typed array (Float32Array, Int8Array, etc.)";
|
|
479
160
|
};
|
|
480
161
|
};
|
|
481
162
|
readonly required: readonly ["vector"];
|
|
482
163
|
readonly additionalProperties: false;
|
|
483
164
|
};
|
|
484
|
-
export type ImageEmbeddingTaskInput = FromSchema<typeof ImageEmbeddingInputSchema>;
|
|
485
|
-
export type ImageEmbeddingTaskOutput = FromSchema<typeof ImageEmbeddingOutputSchema>;
|
|
486
|
-
export type ImageEmbeddingTaskExecuteInput = DeReplicateFromSchema<typeof ImageEmbeddingInputSchema>;
|
|
487
|
-
export type ImageEmbeddingTaskExecuteOutput = DeReplicateFromSchema<typeof ImageEmbeddingOutputSchema>;
|
|
165
|
+
export type ImageEmbeddingTaskInput = FromSchema<typeof ImageEmbeddingInputSchema, TypedArraySchemaOptions>;
|
|
166
|
+
export type ImageEmbeddingTaskOutput = FromSchema<typeof ImageEmbeddingOutputSchema, TypedArraySchemaOptions>;
|
|
488
167
|
/**
|
|
489
168
|
* Generates embeddings from images using vision models
|
|
490
169
|
*/
|
|
@@ -503,7 +182,7 @@ export declare class ImageEmbeddingTask extends AiVisionTask<ImageEmbeddingTaskI
|
|
|
503
182
|
* @returns Promise resolving to the image embedding vector
|
|
504
183
|
*/
|
|
505
184
|
export declare const imageEmbedding: (input: ImageEmbeddingTaskInput, config?: JobQueueTaskConfig) => Promise<{
|
|
506
|
-
vector:
|
|
185
|
+
vector: import("@workglow/util").TypedArray;
|
|
507
186
|
}>;
|
|
508
187
|
declare module "@workglow/task-graph" {
|
|
509
188
|
interface Workflow {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageEmbeddingTask.d.ts","sourceRoot":"","sources":["../../src/task/ImageEmbeddingTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ImageEmbeddingTask.d.ts","sourceRoot":"","sources":["../../src/task/ImageEmbeddingTask.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;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AASnD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQH,CAAC;AAEpC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;CAOJ,CAAC;AAEpC,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAC9C,OAAO,yBAAyB,EAChC,uBAAuB,CACxB,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,OAAO,0BAA0B,EACjC,uBAAuB,CACxB,CAAC;AAEF;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,YAAY,CAClD,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,CACnB;IACC,OAAc,IAAI,SAAwB;IAC1C,OAAc,QAAQ,SAAqB;IAC3C,OAAc,KAAK,SAAqB;IACxC,OAAc,WAAW,SAA0D;WACrE,WAAW,IAAI,cAAc;WAG7B,YAAY,IAAI,cAAc;CAG7C;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,uBAAuB,EAAE,SAAS,kBAAkB;;EAEzF,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,cAAc,EAAE,cAAc,CAC5B,uBAAuB,EACvB,wBAAwB,EACxB,kBAAkB,CACnB,CAAC;KACH;CACF"}
|