@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
|
@@ -5,298 +5,145 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { CreateWorkflow, JobQueueTaskConfig } from "@workglow/task-graph";
|
|
7
7
|
import { DataPortSchema, FromSchema } from "@workglow/util";
|
|
8
|
-
import { DeReplicateFromSchema } from "./base/AiTaskSchemas";
|
|
9
8
|
import { AiVisionTask } from "./base/AiVisionTask";
|
|
10
9
|
export declare const PoseLandmarkerInputSchema: {
|
|
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: true;
|
|
142
|
+
} & {
|
|
143
|
+
readonly format: import(".").TypeModelSemantic;
|
|
297
144
|
}];
|
|
298
|
-
|
|
299
|
-
readonly
|
|
145
|
+
} & {
|
|
146
|
+
readonly format: import(".").TypeModelSemantic;
|
|
300
147
|
};
|
|
301
148
|
readonly numPoses: {
|
|
302
149
|
readonly type: "number";
|
|
@@ -572,8 +419,6 @@ export declare const PoseLandmarkerOutputSchema: {
|
|
|
572
419
|
};
|
|
573
420
|
export type PoseLandmarkerTaskInput = FromSchema<typeof PoseLandmarkerInputSchema>;
|
|
574
421
|
export type PoseLandmarkerTaskOutput = FromSchema<typeof PoseLandmarkerOutputSchema>;
|
|
575
|
-
export type PoseLandmarkerTaskExecuteInput = DeReplicateFromSchema<typeof PoseLandmarkerInputSchema>;
|
|
576
|
-
export type PoseLandmarkerTaskExecuteOutput = DeReplicateFromSchema<typeof PoseLandmarkerOutputSchema>;
|
|
577
422
|
/**
|
|
578
423
|
* Detects pose landmarks in images using MediaPipe Pose Landmarker.
|
|
579
424
|
* Identifies 33 body landmarks for pose estimation and optional segmentation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PoseLandmarkerTask.d.ts","sourceRoot":"","sources":["../../src/task/PoseLandmarkerTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"PoseLandmarkerTask.d.ts","sourceRoot":"","sources":["../../src/task/PoseLandmarkerTask.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;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AA0FnD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDH,CAAC;AAEpC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcJ,CAAC;AAEpC,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACnF,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAErF;;;GAGG;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,SACyF;WACpG,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"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { CreateWorkflow, IExecuteContext, JobQueueTaskConfig, Task } from "@workglow/task-graph";
|
|
7
|
+
import { DataPortSchema, FromSchema } from "@workglow/util";
|
|
8
|
+
export declare const QueryExpansionMethod: {
|
|
9
|
+
readonly MULTI_QUERY: "multi-query";
|
|
10
|
+
readonly HYDE: "hyde";
|
|
11
|
+
readonly SYNONYMS: "synonyms";
|
|
12
|
+
readonly PARAPHRASE: "paraphrase";
|
|
13
|
+
};
|
|
14
|
+
export type QueryExpansionMethod = (typeof QueryExpansionMethod)[keyof typeof QueryExpansionMethod];
|
|
15
|
+
declare const inputSchema: {
|
|
16
|
+
readonly type: "object";
|
|
17
|
+
readonly properties: {
|
|
18
|
+
readonly query: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly title: "Query";
|
|
21
|
+
readonly description: "The original query to expand";
|
|
22
|
+
};
|
|
23
|
+
readonly method: {
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
readonly enum: ("multi-query" | "hyde" | "synonyms" | "paraphrase")[];
|
|
26
|
+
readonly title: "Expansion Method";
|
|
27
|
+
readonly description: "Method to use for query expansion";
|
|
28
|
+
readonly default: "multi-query";
|
|
29
|
+
};
|
|
30
|
+
readonly numVariations: {
|
|
31
|
+
readonly type: "number";
|
|
32
|
+
readonly title: "Number of Variations";
|
|
33
|
+
readonly description: "Number of query variations to generate";
|
|
34
|
+
readonly minimum: 1;
|
|
35
|
+
readonly maximum: 10;
|
|
36
|
+
readonly default: 3;
|
|
37
|
+
};
|
|
38
|
+
readonly model: {
|
|
39
|
+
readonly type: "string";
|
|
40
|
+
readonly title: "Model";
|
|
41
|
+
readonly description: "LLM model to use for expansion (for HyDE and paraphrase methods)";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly required: readonly ["query"];
|
|
45
|
+
readonly additionalProperties: false;
|
|
46
|
+
};
|
|
47
|
+
declare const outputSchema: {
|
|
48
|
+
readonly type: "object";
|
|
49
|
+
readonly properties: {
|
|
50
|
+
readonly queries: {
|
|
51
|
+
readonly type: "array";
|
|
52
|
+
readonly items: {
|
|
53
|
+
readonly type: "string";
|
|
54
|
+
};
|
|
55
|
+
readonly title: "Expanded Queries";
|
|
56
|
+
readonly description: "Generated query variations";
|
|
57
|
+
};
|
|
58
|
+
readonly originalQuery: {
|
|
59
|
+
readonly type: "string";
|
|
60
|
+
readonly title: "Original Query";
|
|
61
|
+
readonly description: "The original input query";
|
|
62
|
+
};
|
|
63
|
+
readonly method: {
|
|
64
|
+
readonly type: "string";
|
|
65
|
+
readonly title: "Method Used";
|
|
66
|
+
readonly description: "The expansion method that was used";
|
|
67
|
+
};
|
|
68
|
+
readonly count: {
|
|
69
|
+
readonly type: "number";
|
|
70
|
+
readonly title: "Count";
|
|
71
|
+
readonly description: "Number of queries generated";
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
readonly required: readonly ["queries", "originalQuery", "method", "count"];
|
|
75
|
+
readonly additionalProperties: false;
|
|
76
|
+
};
|
|
77
|
+
export type QueryExpanderTaskInput = FromSchema<typeof inputSchema>;
|
|
78
|
+
export type QueryExpanderTaskOutput = FromSchema<typeof outputSchema>;
|
|
79
|
+
/**
|
|
80
|
+
* Task for expanding queries to improve retrieval coverage.
|
|
81
|
+
* Supports multiple expansion methods including multi-query, HyDE, and paraphrasing.
|
|
82
|
+
*
|
|
83
|
+
* Note: HyDE and paraphrase methods require an LLM model.
|
|
84
|
+
* For now, this implements simple rule-based expansion.
|
|
85
|
+
*/
|
|
86
|
+
export declare class QueryExpanderTask extends Task<QueryExpanderTaskInput, QueryExpanderTaskOutput, JobQueueTaskConfig> {
|
|
87
|
+
static type: string;
|
|
88
|
+
static category: string;
|
|
89
|
+
static title: string;
|
|
90
|
+
static description: string;
|
|
91
|
+
static cacheable: boolean;
|
|
92
|
+
static inputSchema(): DataPortSchema;
|
|
93
|
+
static outputSchema(): DataPortSchema;
|
|
94
|
+
execute(input: QueryExpanderTaskInput, context: IExecuteContext): Promise<QueryExpanderTaskOutput>;
|
|
95
|
+
/**
|
|
96
|
+
* Multi-query expansion: Generate variations by rephrasing the question
|
|
97
|
+
*/
|
|
98
|
+
private multiQueryExpansion;
|
|
99
|
+
/**
|
|
100
|
+
* HyDE (Hypothetical Document Embeddings): Generate hypothetical answers
|
|
101
|
+
*/
|
|
102
|
+
private hydeExpansion;
|
|
103
|
+
/**
|
|
104
|
+
* Synonym expansion: Replace keywords with synonyms
|
|
105
|
+
*/
|
|
106
|
+
private synonymExpansion;
|
|
107
|
+
/**
|
|
108
|
+
* Paraphrase expansion: Rephrase the query
|
|
109
|
+
* TODO: This should use an LLM for better paraphrasing
|
|
110
|
+
*/
|
|
111
|
+
private paraphraseExpansion;
|
|
112
|
+
/**
|
|
113
|
+
* Preserve capitalization pattern from original to new query
|
|
114
|
+
*/
|
|
115
|
+
private preserveCapitalization;
|
|
116
|
+
}
|
|
117
|
+
export declare const queryExpander: (input: QueryExpanderTaskInput, config?: JobQueueTaskConfig) => Promise<{
|
|
118
|
+
count: number;
|
|
119
|
+
method: string;
|
|
120
|
+
queries: string[];
|
|
121
|
+
originalQuery: string;
|
|
122
|
+
}>;
|
|
123
|
+
declare module "@workglow/task-graph" {
|
|
124
|
+
interface Workflow {
|
|
125
|
+
queryExpander: CreateWorkflow<QueryExpanderTaskInput, QueryExpanderTaskOutput, JobQueueTaskConfig>;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
export {};
|
|
129
|
+
//# sourceMappingURL=QueryExpanderTask.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryExpanderTask.d.ts","sourceRoot":"","sources":["../../src/task/QueryExpanderTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,IAAI,EAEL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAEpG,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BkB,CAAC;AAEpC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BiB,CAAC;AAEpC,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AACpE,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAEtE;;;;;;GAMG;AACH,qBAAa,iBAAkB,SAAQ,IAAI,CACzC,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,CACnB;IACC,OAAc,IAAI,SAAuB;IACzC,OAAc,QAAQ,SAAS;IAC/B,OAAc,KAAK,SAAoB;IACvC,OAAc,WAAW,SAAkD;IAC3E,OAAc,SAAS,UAAQ;WAEjB,WAAW,IAAI,cAAc;WAI7B,YAAY,IAAI,cAAc;IAItC,OAAO,CACX,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,uBAAuB,CAAC;IAkCnC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAyC3B;;OAEG;IACH,OAAO,CAAC,aAAa;IAkBrB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA6CxB;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAoB3B;;OAEG;IACH,OAAO,CAAC,sBAAsB;CAM/B;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,sBAAsB,EAAE,SAAS,kBAAkB;;;;;EAEvF,CAAC;AAEF,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,QAAQ;QAChB,aAAa,EAAE,cAAc,CAC3B,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,CACnB,CAAC;KACH;CACF"}
|