@workglow/ai 0.2.19 → 0.2.21
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 +11 -0
- package/dist/browser.js +499 -275
- package/dist/browser.js.map +40 -35
- package/dist/bun.js +499 -275
- package/dist/bun.js.map +40 -35
- package/dist/common.d.ts +1 -0
- package/dist/common.d.ts.map +1 -1
- package/dist/errors/ImageGenerationErrors.d.ts +36 -0
- package/dist/errors/ImageGenerationErrors.d.ts.map +1 -0
- package/dist/job/AiJob.d.ts +6 -0
- package/dist/job/AiJob.d.ts.map +1 -1
- package/dist/node.js +499 -275
- package/dist/node.js.map +40 -35
- package/dist/provider/AiProviderRegistry.d.ts +6 -0
- package/dist/provider/AiProviderRegistry.d.ts.map +1 -1
- package/dist/task/AiChatTask.d.ts +1 -0
- package/dist/task/AiChatTask.d.ts.map +1 -1
- package/dist/task/BackgroundRemovalTask.d.ts +4 -10
- package/dist/task/BackgroundRemovalTask.d.ts.map +1 -1
- package/dist/task/CountTokensTask.d.ts +1 -1
- package/dist/task/CountTokensTask.d.ts.map +1 -1
- package/dist/task/DownloadModelTask.d.ts +2 -2
- package/dist/task/DownloadModelTask.d.ts.map +1 -1
- package/dist/task/FaceDetectorTask.d.ts +2 -2
- package/dist/task/FaceDetectorTask.d.ts.map +1 -1
- package/dist/task/FaceLandmarkerTask.d.ts +6 -2
- package/dist/task/FaceLandmarkerTask.d.ts.map +1 -1
- package/dist/task/GestureRecognizerTask.d.ts +10 -2
- package/dist/task/GestureRecognizerTask.d.ts.map +1 -1
- package/dist/task/HandLandmarkerTask.d.ts +10 -2
- package/dist/task/HandLandmarkerTask.d.ts.map +1 -1
- package/dist/task/ImageClassificationTask.d.ts +2 -2
- package/dist/task/ImageClassificationTask.d.ts.map +1 -1
- package/dist/task/ImageEmbeddingTask.d.ts +3 -3
- package/dist/task/ImageEmbeddingTask.d.ts.map +1 -1
- package/dist/task/ImageSegmentationTask.d.ts +2 -2
- package/dist/task/ImageSegmentationTask.d.ts.map +1 -1
- package/dist/task/ImageToTextTask.d.ts +2 -2
- package/dist/task/ImageToTextTask.d.ts.map +1 -1
- package/dist/task/ObjectDetectionTask.d.ts +2 -2
- package/dist/task/ObjectDetectionTask.d.ts.map +1 -1
- package/dist/task/PoseLandmarkerTask.d.ts +14 -10
- package/dist/task/PoseLandmarkerTask.d.ts.map +1 -1
- package/dist/task/StructuredGenerationTask.d.ts +1 -0
- package/dist/task/StructuredGenerationTask.d.ts.map +1 -1
- package/dist/task/TextClassificationTask.d.ts +1 -1
- package/dist/task/TextClassificationTask.d.ts.map +1 -1
- package/dist/task/TextEmbeddingTask.d.ts +1 -1
- package/dist/task/TextEmbeddingTask.d.ts.map +1 -1
- package/dist/task/TextFillMaskTask.d.ts +1 -1
- package/dist/task/TextFillMaskTask.d.ts.map +1 -1
- package/dist/task/TextGenerationTask.d.ts +2 -1
- package/dist/task/TextGenerationTask.d.ts.map +1 -1
- package/dist/task/TextLanguageDetectionTask.d.ts +1 -1
- package/dist/task/TextLanguageDetectionTask.d.ts.map +1 -1
- package/dist/task/TextNamedEntityRecognitionTask.d.ts +1 -1
- package/dist/task/TextNamedEntityRecognitionTask.d.ts.map +1 -1
- package/dist/task/TextQuestionAnswerTask.d.ts +2 -1
- package/dist/task/TextQuestionAnswerTask.d.ts.map +1 -1
- package/dist/task/TextRewriterTask.d.ts +2 -1
- package/dist/task/TextRewriterTask.d.ts.map +1 -1
- package/dist/task/TextSummaryTask.d.ts +2 -1
- package/dist/task/TextSummaryTask.d.ts.map +1 -1
- package/dist/task/TextTranslationTask.d.ts +2 -1
- package/dist/task/TextTranslationTask.d.ts.map +1 -1
- package/dist/task/ToolCallingTask.d.ts +2 -1
- package/dist/task/ToolCallingTask.d.ts.map +1 -1
- package/dist/task/base/AiImageOutputTask.d.ts +108 -0
- package/dist/task/base/AiImageOutputTask.d.ts.map +1 -0
- package/dist/task/base/AiTaskSchemas.d.ts +68 -2
- package/dist/task/base/AiTaskSchemas.d.ts.map +1 -1
- package/dist/task/base/AiTaskSchemas.test.d.ts +7 -0
- package/dist/task/base/AiTaskSchemas.test.d.ts.map +1 -0
- package/dist/task/base/AiVisionTask.d.ts +6 -4
- package/dist/task/base/AiVisionTask.d.ts.map +1 -1
- package/dist/task/base/StreamingAiTask.d.ts +14 -0
- package/dist/task/base/StreamingAiTask.d.ts.map +1 -1
- package/dist/task/generation/AiImageSchemas.d.ts +73 -0
- package/dist/task/generation/AiImageSchemas.d.ts.map +1 -0
- package/dist/task/generation/ImageEditTask.d.ts +156 -0
- package/dist/task/generation/ImageEditTask.d.ts.map +1 -0
- package/dist/task/generation/ImageGenerateTask.d.ts +148 -0
- package/dist/task/generation/ImageGenerateTask.d.ts.map +1 -0
- package/dist/task/index.d.ts +7 -1
- package/dist/task/index.d.ts.map +1 -1
- package/dist/worker.js +48 -11
- package/dist/worker.js.map +6 -5
- package/package.json +11 -11
package/dist/browser.js
CHANGED
|
@@ -46,6 +46,9 @@ class AiProviderRegistry {
|
|
|
46
46
|
registerStrategyResolver(providerName, resolver) {
|
|
47
47
|
this.strategyResolvers.set(providerName, resolver);
|
|
48
48
|
}
|
|
49
|
+
setDefaultStrategy(strategy) {
|
|
50
|
+
this.defaultStrategy = strategy;
|
|
51
|
+
}
|
|
49
52
|
getStrategy(model) {
|
|
50
53
|
const resolver = this.strategyResolvers.get(model.provider);
|
|
51
54
|
if (resolver)
|
|
@@ -148,6 +151,41 @@ function setAiProviderRegistry(pr) {
|
|
|
148
151
|
providerRegistry = pr;
|
|
149
152
|
}
|
|
150
153
|
|
|
154
|
+
// src/errors/ImageGenerationErrors.ts
|
|
155
|
+
class ProviderUnsupportedFeatureError extends Error {
|
|
156
|
+
field;
|
|
157
|
+
modelId;
|
|
158
|
+
retryable = false;
|
|
159
|
+
constructor(field, modelId, detail) {
|
|
160
|
+
super(`Model "${modelId}" does not support input field "${field}": ${detail}`);
|
|
161
|
+
this.field = field;
|
|
162
|
+
this.modelId = modelId;
|
|
163
|
+
this.name = "ProviderUnsupportedFeatureError";
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
class ImageGenerationContentPolicyError extends Error {
|
|
168
|
+
modelId;
|
|
169
|
+
providerReason;
|
|
170
|
+
retryable = false;
|
|
171
|
+
constructor(modelId, providerReason) {
|
|
172
|
+
super(`Image generation refused by ${modelId}: ${providerReason}`);
|
|
173
|
+
this.modelId = modelId;
|
|
174
|
+
this.providerReason = providerReason;
|
|
175
|
+
this.name = "ImageGenerationContentPolicyError";
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
class ImageGenerationProviderError extends Error {
|
|
180
|
+
modelId;
|
|
181
|
+
retryable = true;
|
|
182
|
+
constructor(modelId, message, options) {
|
|
183
|
+
super(`${modelId}: ${message}`, options);
|
|
184
|
+
this.modelId = modelId;
|
|
185
|
+
this.name = "ImageGenerationProviderError";
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
151
189
|
// src/job/AiJob.ts
|
|
152
190
|
var DEFAULT_AI_TIMEOUT_MS = 120000;
|
|
153
191
|
var LOCAL_INFERENCE_DEFAULT_TIMEOUT_MS = 300000;
|
|
@@ -164,6 +202,12 @@ function classifyProviderError(err, taskType, provider) {
|
|
|
164
202
|
if (err instanceof PermanentJobError || err instanceof RetryableJobError || err instanceof AbortSignalJobError) {
|
|
165
203
|
return err;
|
|
166
204
|
}
|
|
205
|
+
if (err instanceof ProviderUnsupportedFeatureError || err instanceof ImageGenerationContentPolicyError) {
|
|
206
|
+
return new PermanentJobError(err.message);
|
|
207
|
+
}
|
|
208
|
+
if (err instanceof ImageGenerationProviderError) {
|
|
209
|
+
return err.retryable ? new RetryableJobError(err.message) : new PermanentJobError(err.message);
|
|
210
|
+
}
|
|
167
211
|
const message = err instanceof Error ? err.message : String(err);
|
|
168
212
|
const status = typeof err?.status === "number" ? err.status : typeof err?.statusCode === "number" ? err.statusCode : (() => {
|
|
169
213
|
const m = message.match(/\b([45]\d{2})\b/);
|
|
@@ -250,23 +294,14 @@ class AiJob extends Job {
|
|
|
250
294
|
return;
|
|
251
295
|
}
|
|
252
296
|
const model = input.taskInput.model;
|
|
253
|
-
let lastFinishData;
|
|
254
297
|
const timeoutMs = resolveAiJobTimeoutMs(input.aiProvider, input.timeoutMs);
|
|
255
298
|
const timeoutSignal = AbortSignal.timeout(timeoutMs);
|
|
256
299
|
const combinedSignal = AbortSignal.any([context.signal, timeoutSignal]);
|
|
257
300
|
try {
|
|
258
|
-
|
|
259
|
-
if (event.type === "finish") {
|
|
260
|
-
lastFinishData = event.data;
|
|
261
|
-
}
|
|
262
|
-
yield event;
|
|
263
|
-
}
|
|
301
|
+
yield* streamFn(input.taskInput, model, combinedSignal, input.outputSchema, input.sessionId);
|
|
264
302
|
} catch (err) {
|
|
265
303
|
const logger = getLogger();
|
|
266
304
|
logger.warn(`AiJob: Stream error for ${input.taskType} (${input.aiProvider}): ${err instanceof Error ? err.message : String(err)}`);
|
|
267
|
-
if (lastFinishData === undefined) {
|
|
268
|
-
yield { type: "finish", data: {} };
|
|
269
|
-
}
|
|
270
305
|
throw classifyProviderError(err, input.taskType, input.aiProvider);
|
|
271
306
|
}
|
|
272
307
|
}
|
|
@@ -883,11 +918,50 @@ function TypeSingleOrArray(type) {
|
|
|
883
918
|
anyOf: [type, { type: "array", items: type }]
|
|
884
919
|
};
|
|
885
920
|
}
|
|
921
|
+
var TypeLandmark = {
|
|
922
|
+
type: "object",
|
|
923
|
+
properties: {
|
|
924
|
+
x: {
|
|
925
|
+
type: "number",
|
|
926
|
+
title: "X Coordinate",
|
|
927
|
+
description: "X coordinate normalized to [0.0, 1.0]"
|
|
928
|
+
},
|
|
929
|
+
y: {
|
|
930
|
+
type: "number",
|
|
931
|
+
title: "Y Coordinate",
|
|
932
|
+
description: "Y coordinate normalized to [0.0, 1.0]"
|
|
933
|
+
},
|
|
934
|
+
z: {
|
|
935
|
+
type: "number",
|
|
936
|
+
title: "Z Coordinate",
|
|
937
|
+
description: "Z coordinate (depth)"
|
|
938
|
+
}
|
|
939
|
+
},
|
|
940
|
+
required: ["x", "y", "z"],
|
|
941
|
+
format: "point:3d:relative",
|
|
942
|
+
additionalProperties: false
|
|
943
|
+
};
|
|
944
|
+
var TypePoseLandmark = {
|
|
945
|
+
...TypeLandmark,
|
|
946
|
+
properties: {
|
|
947
|
+
...TypeLandmark.properties,
|
|
948
|
+
visibility: {
|
|
949
|
+
type: "number",
|
|
950
|
+
title: "Visibility",
|
|
951
|
+
description: "Likelihood of the landmark being visible within the image"
|
|
952
|
+
},
|
|
953
|
+
presence: {
|
|
954
|
+
type: "number",
|
|
955
|
+
title: "Presence",
|
|
956
|
+
description: "Likelihood of the landmark being present in the image"
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
};
|
|
886
960
|
var TypeImageInput = {
|
|
887
961
|
type: "object",
|
|
888
962
|
properties: {},
|
|
889
963
|
title: "Image",
|
|
890
|
-
description: "Image as data URI, Blob, ImageBitmap,
|
|
964
|
+
description: "Image as data: URI, Blob, ImageBitmap, or ImageValue — hydrated to ImageValue at task entry",
|
|
891
965
|
format: "image"
|
|
892
966
|
};
|
|
893
967
|
var TypeAudioInput = {
|
|
@@ -1117,6 +1191,8 @@ class AiTask extends Task {
|
|
|
1117
1191
|
// src/task/base/StreamingAiTask.ts
|
|
1118
1192
|
class StreamingAiTask extends AiTask {
|
|
1119
1193
|
static type = "StreamingAiTask";
|
|
1194
|
+
static preparingPhaseLabel = "Preparing";
|
|
1195
|
+
static streamingPhaseLabel = "Streaming";
|
|
1120
1196
|
async* executeStream(input, context) {
|
|
1121
1197
|
const model = input.model;
|
|
1122
1198
|
if (!model || typeof model !== "object") {
|
|
@@ -1136,7 +1212,16 @@ class StreamingAiTask extends AiTask {
|
|
|
1136
1212
|
defaultPort = firstProp;
|
|
1137
1213
|
}
|
|
1138
1214
|
}
|
|
1215
|
+
const ctor = this.constructor;
|
|
1216
|
+
const preparingLabel = ctor.preparingPhaseLabel;
|
|
1217
|
+
const streamingLabel = ctor.streamingPhaseLabel;
|
|
1218
|
+
yield { type: "phase", message: preparingLabel, progress: undefined };
|
|
1219
|
+
let firstDataSeen = false;
|
|
1139
1220
|
for await (const event of strategy.executeStream(jobInput, context, this.runConfig.runnerId)) {
|
|
1221
|
+
if (!firstDataSeen && (event.type === "text-delta" || event.type === "object-delta" || event.type === "snapshot")) {
|
|
1222
|
+
firstDataSeen = true;
|
|
1223
|
+
yield { type: "phase", message: streamingLabel, progress: undefined };
|
|
1224
|
+
}
|
|
1140
1225
|
if (event.type === "text-delta") {
|
|
1141
1226
|
yield { ...event, port: event.port ?? defaultPort };
|
|
1142
1227
|
} else if (event.type === "object-delta") {
|
|
@@ -1361,6 +1446,7 @@ var AiChatOutputSchema = {
|
|
|
1361
1446
|
|
|
1362
1447
|
class AiChatTask extends StreamingAiTask {
|
|
1363
1448
|
static type = "AiChatTask";
|
|
1449
|
+
static streamingPhaseLabel = "Replying";
|
|
1364
1450
|
static category = "AI Chat";
|
|
1365
1451
|
static title = "AI Chat";
|
|
1366
1452
|
static description = "Multi-turn chat with a language model, using a human connector to collect user input between turns.";
|
|
@@ -1506,40 +1592,15 @@ class AiChatTask extends StreamingAiTask {
|
|
|
1506
1592
|
|
|
1507
1593
|
// src/task/BackgroundRemovalTask.ts
|
|
1508
1594
|
import { CreateWorkflow, Workflow } from "@workglow/task-graph";
|
|
1595
|
+
import { ImageValueSchema } from "@workglow/util/media";
|
|
1509
1596
|
|
|
1510
1597
|
// src/task/base/AiVisionTask.ts
|
|
1511
1598
|
class AiVisionTask extends AiTask {
|
|
1512
1599
|
static type = "AiVisionTask";
|
|
1513
|
-
async getJobInput(input) {
|
|
1514
|
-
const jobInput = await super.getJobInput(input);
|
|
1515
|
-
if (!input.image)
|
|
1516
|
-
return jobInput;
|
|
1517
|
-
const provider = input.model.provider;
|
|
1518
|
-
const wantsBitmap = typeof provider === "string" && provider.startsWith("TENSORFLOW_MEDIAPIPE") && typeof ImageBitmap !== "undefined";
|
|
1519
|
-
const materializeOne = async (img) => {
|
|
1520
|
-
if (wantsBitmap) {
|
|
1521
|
-
const bin = await img.materialize();
|
|
1522
|
-
const id = new ImageData(bin.data, bin.width, bin.height);
|
|
1523
|
-
return createImageBitmap(id);
|
|
1524
|
-
}
|
|
1525
|
-
return img.materialize();
|
|
1526
|
-
};
|
|
1527
|
-
const value = input.image;
|
|
1528
|
-
const materialized = Array.isArray(value) ? await Promise.all(value.map(materializeOne)) : await materializeOne(value);
|
|
1529
|
-
jobInput.taskInput.image = materialized;
|
|
1530
|
-
return jobInput;
|
|
1531
|
-
}
|
|
1532
1600
|
}
|
|
1533
1601
|
|
|
1534
1602
|
// src/task/BackgroundRemovalTask.ts
|
|
1535
1603
|
var modelSchema2 = TypeModel("model:BackgroundRemovalTask");
|
|
1536
|
-
var processedImageSchema = {
|
|
1537
|
-
type: "string",
|
|
1538
|
-
contentEncoding: "base64",
|
|
1539
|
-
contentMediaType: "image/png",
|
|
1540
|
-
title: "Image",
|
|
1541
|
-
description: "Base64-encoded PNG image with transparent background"
|
|
1542
|
-
};
|
|
1543
1604
|
var BackgroundRemovalInputSchema = {
|
|
1544
1605
|
type: "object",
|
|
1545
1606
|
properties: {
|
|
@@ -1552,7 +1613,10 @@ var BackgroundRemovalInputSchema = {
|
|
|
1552
1613
|
var BackgroundRemovalOutputSchema = {
|
|
1553
1614
|
type: "object",
|
|
1554
1615
|
properties: {
|
|
1555
|
-
image:
|
|
1616
|
+
image: ImageValueSchema({
|
|
1617
|
+
title: "Image",
|
|
1618
|
+
description: "Image with transparent background"
|
|
1619
|
+
})
|
|
1556
1620
|
},
|
|
1557
1621
|
required: ["image"],
|
|
1558
1622
|
additionalProperties: false
|
|
@@ -1560,7 +1624,7 @@ var BackgroundRemovalOutputSchema = {
|
|
|
1560
1624
|
|
|
1561
1625
|
class BackgroundRemovalTask extends AiVisionTask {
|
|
1562
1626
|
static type = "BackgroundRemovalTask";
|
|
1563
|
-
static category = "AI Vision
|
|
1627
|
+
static category = "AI Vision";
|
|
1564
1628
|
static title = "Background Removal";
|
|
1565
1629
|
static description = "Removes backgrounds from images, producing images with transparent backgrounds";
|
|
1566
1630
|
static inputSchema() {
|
|
@@ -1616,7 +1680,7 @@ var TextEmbeddingOutputSchema = {
|
|
|
1616
1680
|
|
|
1617
1681
|
class TextEmbeddingTask extends AiTask {
|
|
1618
1682
|
static type = "TextEmbeddingTask";
|
|
1619
|
-
static category = "AI Text
|
|
1683
|
+
static category = "AI Text";
|
|
1620
1684
|
static title = "Text Embedding";
|
|
1621
1685
|
static description = "Generates vector embeddings for text to capture semantic meaning";
|
|
1622
1686
|
static inputSchema() {
|
|
@@ -1999,7 +2063,7 @@ var CountTokensOutputSchema = {
|
|
|
1999
2063
|
|
|
2000
2064
|
class CountTokensTask extends AiTask {
|
|
2001
2065
|
static type = "CountTokensTask";
|
|
2002
|
-
static category = "AI Text
|
|
2066
|
+
static category = "AI Text";
|
|
2003
2067
|
static title = "Count Tokens";
|
|
2004
2068
|
static description = "Counts the number of tokens in a text string using the model's tokenizer";
|
|
2005
2069
|
static cacheable = true;
|
|
@@ -2385,7 +2449,7 @@ var TextNamedEntityRecognitionOutputSchema = {
|
|
|
2385
2449
|
|
|
2386
2450
|
class TextNamedEntityRecognitionTask extends AiTask {
|
|
2387
2451
|
static type = "TextNamedEntityRecognitionTask";
|
|
2388
|
-
static category = "AI Text
|
|
2452
|
+
static category = "AI Text";
|
|
2389
2453
|
static title = "Named Entity Recognition";
|
|
2390
2454
|
static description = "Extracts named entities from text";
|
|
2391
2455
|
static inputSchema() {
|
|
@@ -2432,8 +2496,9 @@ var TextSummaryOutputSchema = {
|
|
|
2432
2496
|
|
|
2433
2497
|
class TextSummaryTask extends StreamingAiTask {
|
|
2434
2498
|
static type = "TextSummaryTask";
|
|
2435
|
-
static category = "AI Text
|
|
2499
|
+
static category = "AI Text";
|
|
2436
2500
|
static title = "Text Summary";
|
|
2501
|
+
static streamingPhaseLabel = "Summarizing";
|
|
2437
2502
|
static description = "Summarizes text into a shorter form while preserving key information";
|
|
2438
2503
|
static inputSchema() {
|
|
2439
2504
|
return TextSummaryInputSchema;
|
|
@@ -2833,9 +2898,196 @@ var downloadModel = (input, config) => {
|
|
|
2833
2898
|
};
|
|
2834
2899
|
Workflow11.prototype.downloadModel = CreateWorkflow11(DownloadModelTask);
|
|
2835
2900
|
|
|
2836
|
-
// src/task/
|
|
2901
|
+
// src/task/generation/ImageEditTask.ts
|
|
2837
2902
|
import { CreateWorkflow as CreateWorkflow12, Workflow as Workflow12 } from "@workglow/task-graph";
|
|
2838
|
-
|
|
2903
|
+
import { ImageValueSchema as ImageValueSchema3 } from "@workglow/util/media";
|
|
2904
|
+
|
|
2905
|
+
// src/task/base/AiImageOutputTask.ts
|
|
2906
|
+
class AiImageOutputTask extends StreamingAiTask {
|
|
2907
|
+
static type = "AiImageOutputTask";
|
|
2908
|
+
static streamingPhaseLabel = "Rendering";
|
|
2909
|
+
_latestPartial = undefined;
|
|
2910
|
+
get cacheable() {
|
|
2911
|
+
const seed = this.runInputData?.seed;
|
|
2912
|
+
if (seed === undefined || seed === null)
|
|
2913
|
+
return false;
|
|
2914
|
+
return super.cacheable;
|
|
2915
|
+
}
|
|
2916
|
+
ingestPartial(image) {
|
|
2917
|
+
this._latestPartial = image;
|
|
2918
|
+
}
|
|
2919
|
+
takeFinalPartial() {
|
|
2920
|
+
const partial = this._latestPartial;
|
|
2921
|
+
this._latestPartial = undefined;
|
|
2922
|
+
return partial;
|
|
2923
|
+
}
|
|
2924
|
+
discardPartial() {
|
|
2925
|
+
this._latestPartial = undefined;
|
|
2926
|
+
}
|
|
2927
|
+
async* executeStream(input, context) {
|
|
2928
|
+
try {
|
|
2929
|
+
for await (const event of super.executeStream(input, context)) {
|
|
2930
|
+
if (event.type === "snapshot") {
|
|
2931
|
+
const newImage = event.data?.image;
|
|
2932
|
+
if (newImage) {
|
|
2933
|
+
this.ingestPartial(newImage);
|
|
2934
|
+
}
|
|
2935
|
+
yield event;
|
|
2936
|
+
} else if (event.type === "finish") {
|
|
2937
|
+
this._latestPartial = undefined;
|
|
2938
|
+
yield event;
|
|
2939
|
+
} else {
|
|
2940
|
+
yield event;
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
} catch (err) {
|
|
2944
|
+
this.discardPartial();
|
|
2945
|
+
throw err;
|
|
2946
|
+
}
|
|
2947
|
+
}
|
|
2948
|
+
async executePreview(_input, _context) {
|
|
2949
|
+
if (this._latestPartial !== undefined) {
|
|
2950
|
+
return { image: this._latestPartial };
|
|
2951
|
+
}
|
|
2952
|
+
const prior = this.runOutputData?.image;
|
|
2953
|
+
if (prior !== undefined) {
|
|
2954
|
+
return { image: prior };
|
|
2955
|
+
}
|
|
2956
|
+
return;
|
|
2957
|
+
}
|
|
2958
|
+
async cleanup() {
|
|
2959
|
+
this.discardPartial();
|
|
2960
|
+
}
|
|
2961
|
+
async validateProviderImageInput(input) {
|
|
2962
|
+
const model = input.model;
|
|
2963
|
+
if (!model || typeof model === "string")
|
|
2964
|
+
return;
|
|
2965
|
+
const provider = model.provider;
|
|
2966
|
+
const validator = AiImageOutputTask._providerValidators.get(provider);
|
|
2967
|
+
if (validator) {
|
|
2968
|
+
await validator(this.type, input, model);
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
static _providerValidators = new Map;
|
|
2972
|
+
static registerProviderImageValidator(providerName, validator) {
|
|
2973
|
+
AiImageOutputTask._providerValidators.set(providerName, validator);
|
|
2974
|
+
}
|
|
2975
|
+
static unregisterProviderImageValidator(providerName) {
|
|
2976
|
+
AiImageOutputTask._providerValidators.delete(providerName);
|
|
2977
|
+
}
|
|
2978
|
+
static UnsupportedFeatureError = ProviderUnsupportedFeatureError;
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2981
|
+
// src/task/generation/AiImageSchemas.ts
|
|
2982
|
+
import { ImageValueSchema as ImageValueSchema2 } from "@workglow/util/media";
|
|
2983
|
+
var AspectRatioSchema = {
|
|
2984
|
+
type: "string",
|
|
2985
|
+
title: "Aspect Ratio",
|
|
2986
|
+
description: "Output image aspect ratio. Mapped per-provider to the nearest supported size.",
|
|
2987
|
+
enum: ["1:1", "16:9", "9:16", "4:3", "3:4"],
|
|
2988
|
+
default: "1:1"
|
|
2989
|
+
};
|
|
2990
|
+
var QualitySchema = {
|
|
2991
|
+
type: "string",
|
|
2992
|
+
title: "Quality",
|
|
2993
|
+
description: "Generation quality. Only honored by providers that support it (gpt-image-2).",
|
|
2994
|
+
enum: ["low", "medium", "high"],
|
|
2995
|
+
"x-ui-group": "Configuration"
|
|
2996
|
+
};
|
|
2997
|
+
var AiImageOptionsProperties = {
|
|
2998
|
+
aspectRatio: AspectRatioSchema,
|
|
2999
|
+
quality: QualitySchema,
|
|
3000
|
+
seed: {
|
|
3001
|
+
type: "number",
|
|
3002
|
+
title: "Seed",
|
|
3003
|
+
description: "Random seed for reproducibility. When unset, results are non-deterministic and the task is treated as not cacheable.",
|
|
3004
|
+
"x-ui-group": "Configuration"
|
|
3005
|
+
},
|
|
3006
|
+
negativePrompt: {
|
|
3007
|
+
type: "string",
|
|
3008
|
+
title: "Negative Prompt",
|
|
3009
|
+
description: "What the model should avoid. Honored by providers that support it (Imagen, HF diffusion models).",
|
|
3010
|
+
"x-ui-group": "Configuration"
|
|
3011
|
+
},
|
|
3012
|
+
providerOptions: {
|
|
3013
|
+
type: "object",
|
|
3014
|
+
title: "Provider Options",
|
|
3015
|
+
description: "Provider-specific options that don't normalize across providers (e.g., DALL-E style, HF guidance scale).",
|
|
3016
|
+
additionalProperties: true,
|
|
3017
|
+
"x-ui-group": "Advanced"
|
|
3018
|
+
}
|
|
3019
|
+
};
|
|
3020
|
+
var AiImageOutputSchema = {
|
|
3021
|
+
type: "object",
|
|
3022
|
+
properties: {
|
|
3023
|
+
image: ImageValueSchema2({
|
|
3024
|
+
title: "Image",
|
|
3025
|
+
description: "Generated image",
|
|
3026
|
+
"x-stream": "replace"
|
|
3027
|
+
})
|
|
3028
|
+
},
|
|
3029
|
+
required: ["image"],
|
|
3030
|
+
additionalProperties: false
|
|
3031
|
+
};
|
|
3032
|
+
|
|
3033
|
+
// src/task/generation/ImageEditTask.ts
|
|
3034
|
+
var modelSchema9 = TypeModel("model:ImageEditTask");
|
|
3035
|
+
var ImageEditInputSchema = {
|
|
3036
|
+
type: "object",
|
|
3037
|
+
properties: {
|
|
3038
|
+
model: modelSchema9,
|
|
3039
|
+
prompt: {
|
|
3040
|
+
type: "string",
|
|
3041
|
+
title: "Prompt",
|
|
3042
|
+
description: "Text describing the edit to apply"
|
|
3043
|
+
},
|
|
3044
|
+
image: ImageValueSchema3({
|
|
3045
|
+
title: "Image",
|
|
3046
|
+
description: "Primary image to edit"
|
|
3047
|
+
}),
|
|
3048
|
+
mask: ImageValueSchema3({
|
|
3049
|
+
title: "Mask",
|
|
3050
|
+
description: "Optional inpainting mask. Transparent regions indicate where to edit. Supported by OpenAI and HF inpainting models."
|
|
3051
|
+
}),
|
|
3052
|
+
additionalImages: {
|
|
3053
|
+
type: "array",
|
|
3054
|
+
title: "Additional Images",
|
|
3055
|
+
description: "Optional reference / composite images. Used by gpt-image-2 and Gemini 2.5 Flash Image for multi-image edits.",
|
|
3056
|
+
items: ImageValueSchema3()
|
|
3057
|
+
},
|
|
3058
|
+
...AiImageOptionsProperties
|
|
3059
|
+
},
|
|
3060
|
+
required: ["model", "prompt", "image"],
|
|
3061
|
+
additionalProperties: false
|
|
3062
|
+
};
|
|
3063
|
+
var ImageEditOutputSchema = AiImageOutputSchema;
|
|
3064
|
+
|
|
3065
|
+
class ImageEditTask extends AiImageOutputTask {
|
|
3066
|
+
static type = "ImageEditTask";
|
|
3067
|
+
static category = "AI Vision";
|
|
3068
|
+
static title = "Edit Image";
|
|
3069
|
+
static description = "Edits an input image guided by a prompt. Optionally accepts a mask (inpaint) and/or additional reference images (composite).";
|
|
3070
|
+
static cacheable = true;
|
|
3071
|
+
static inputSchema() {
|
|
3072
|
+
return ImageEditInputSchema;
|
|
3073
|
+
}
|
|
3074
|
+
static outputSchema() {
|
|
3075
|
+
return ImageEditOutputSchema;
|
|
3076
|
+
}
|
|
3077
|
+
async validateInput(input) {
|
|
3078
|
+
const ok = await super.validateInput(input);
|
|
3079
|
+
if (!ok)
|
|
3080
|
+
return false;
|
|
3081
|
+
await this.validateProviderImageInput(input);
|
|
3082
|
+
return true;
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
var imageEdit = (input, config) => new ImageEditTask(config).run(input);
|
|
3086
|
+
Workflow12.prototype.imageEdit = CreateWorkflow12(ImageEditTask);
|
|
3087
|
+
|
|
3088
|
+
// src/task/FaceDetectorTask.ts
|
|
3089
|
+
import { CreateWorkflow as CreateWorkflow13, Workflow as Workflow13 } from "@workglow/task-graph";
|
|
3090
|
+
var modelSchema10 = TypeModel("model:FaceDetectorTask");
|
|
2839
3091
|
var TypeBoundingBox2 = {
|
|
2840
3092
|
type: "object",
|
|
2841
3093
|
properties: {
|
|
@@ -2908,7 +3160,7 @@ var FaceDetectorInputSchema = {
|
|
|
2908
3160
|
type: "object",
|
|
2909
3161
|
properties: {
|
|
2910
3162
|
image: TypeImageInput,
|
|
2911
|
-
model:
|
|
3163
|
+
model: modelSchema10,
|
|
2912
3164
|
minDetectionConfidence: {
|
|
2913
3165
|
type: "number",
|
|
2914
3166
|
minimum: 0,
|
|
@@ -2949,7 +3201,7 @@ var FaceDetectorOutputSchema = {
|
|
|
2949
3201
|
|
|
2950
3202
|
class FaceDetectorTask extends AiVisionTask {
|
|
2951
3203
|
static type = "FaceDetectorTask";
|
|
2952
|
-
static category = "AI Vision
|
|
3204
|
+
static category = "AI Vision";
|
|
2953
3205
|
static title = "Face Detector";
|
|
2954
3206
|
static description = "Detects faces in images. Locates faces and identifies facial keypoints like eyes, nose, and mouth.";
|
|
2955
3207
|
static inputSchema() {
|
|
@@ -2962,33 +3214,11 @@ class FaceDetectorTask extends AiVisionTask {
|
|
|
2962
3214
|
var faceDetector = (input, config) => {
|
|
2963
3215
|
return new FaceDetectorTask(config).run(input);
|
|
2964
3216
|
};
|
|
2965
|
-
|
|
3217
|
+
Workflow13.prototype.faceDetector = CreateWorkflow13(FaceDetectorTask);
|
|
2966
3218
|
|
|
2967
3219
|
// src/task/FaceLandmarkerTask.ts
|
|
2968
|
-
import { CreateWorkflow as
|
|
2969
|
-
var
|
|
2970
|
-
var TypeLandmark = {
|
|
2971
|
-
type: "object",
|
|
2972
|
-
properties: {
|
|
2973
|
-
x: {
|
|
2974
|
-
type: "number",
|
|
2975
|
-
title: "X Coordinate",
|
|
2976
|
-
description: "X coordinate normalized to [0.0, 1.0]"
|
|
2977
|
-
},
|
|
2978
|
-
y: {
|
|
2979
|
-
type: "number",
|
|
2980
|
-
title: "Y Coordinate",
|
|
2981
|
-
description: "Y coordinate normalized to [0.0, 1.0]"
|
|
2982
|
-
},
|
|
2983
|
-
z: {
|
|
2984
|
-
type: "number",
|
|
2985
|
-
title: "Z Coordinate",
|
|
2986
|
-
description: "Z coordinate (depth)"
|
|
2987
|
-
}
|
|
2988
|
-
},
|
|
2989
|
-
required: ["x", "y", "z"],
|
|
2990
|
-
additionalProperties: false
|
|
2991
|
-
};
|
|
3220
|
+
import { CreateWorkflow as CreateWorkflow14, Workflow as Workflow14 } from "@workglow/task-graph";
|
|
3221
|
+
var modelSchema11 = TypeModel("model:FaceLandmarkerTask");
|
|
2992
3222
|
var TypeBlendshape = {
|
|
2993
3223
|
type: "object",
|
|
2994
3224
|
properties: {
|
|
@@ -3021,7 +3251,8 @@ var TypeFaceLandmarkerDetection = {
|
|
|
3021
3251
|
type: "array",
|
|
3022
3252
|
items: TypeLandmark,
|
|
3023
3253
|
title: "Landmarks",
|
|
3024
|
-
description: "478 facial landmarks in image coordinates"
|
|
3254
|
+
description: "478 facial landmarks in image coordinates",
|
|
3255
|
+
format: "points:3d:relative"
|
|
3025
3256
|
},
|
|
3026
3257
|
blendshapes: {
|
|
3027
3258
|
type: "array",
|
|
@@ -3038,7 +3269,7 @@ var FaceLandmarkerInputSchema = {
|
|
|
3038
3269
|
type: "object",
|
|
3039
3270
|
properties: {
|
|
3040
3271
|
image: TypeImageInput,
|
|
3041
|
-
model:
|
|
3272
|
+
model: modelSchema11,
|
|
3042
3273
|
numFaces: {
|
|
3043
3274
|
type: "number",
|
|
3044
3275
|
minimum: 1,
|
|
@@ -3111,7 +3342,7 @@ var FaceLandmarkerOutputSchema = {
|
|
|
3111
3342
|
|
|
3112
3343
|
class FaceLandmarkerTask extends AiVisionTask {
|
|
3113
3344
|
static type = "FaceLandmarkerTask";
|
|
3114
|
-
static category = "AI Vision
|
|
3345
|
+
static category = "AI Vision";
|
|
3115
3346
|
static title = "Face Landmarker";
|
|
3116
3347
|
static description = "Detects facial landmarks and expressions in images. Identifies 478 facial landmarks, blendshapes for expressions, and transformation matrices for AR effects.";
|
|
3117
3348
|
static inputSchema() {
|
|
@@ -3124,33 +3355,53 @@ class FaceLandmarkerTask extends AiVisionTask {
|
|
|
3124
3355
|
var faceLandmarker = (input, config) => {
|
|
3125
3356
|
return new FaceLandmarkerTask(config).run(input);
|
|
3126
3357
|
};
|
|
3127
|
-
|
|
3358
|
+
Workflow14.prototype.faceLandmarker = CreateWorkflow14(FaceLandmarkerTask);
|
|
3128
3359
|
|
|
3129
|
-
// src/task/
|
|
3130
|
-
import { CreateWorkflow as
|
|
3131
|
-
var
|
|
3132
|
-
var
|
|
3360
|
+
// src/task/generation/ImageGenerateTask.ts
|
|
3361
|
+
import { CreateWorkflow as CreateWorkflow15, Workflow as Workflow15 } from "@workglow/task-graph";
|
|
3362
|
+
var modelSchema12 = TypeModel("model:ImageGenerateTask");
|
|
3363
|
+
var ImageGenerateInputSchema = {
|
|
3133
3364
|
type: "object",
|
|
3134
3365
|
properties: {
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
y: {
|
|
3141
|
-
type: "number",
|
|
3142
|
-
title: "Y Coordinate",
|
|
3143
|
-
description: "Y coordinate normalized to [0.0, 1.0]"
|
|
3366
|
+
model: modelSchema12,
|
|
3367
|
+
prompt: {
|
|
3368
|
+
type: "string",
|
|
3369
|
+
title: "Prompt",
|
|
3370
|
+
description: "Text describing the image to generate"
|
|
3144
3371
|
},
|
|
3145
|
-
|
|
3146
|
-
type: "number",
|
|
3147
|
-
title: "Z Coordinate",
|
|
3148
|
-
description: "Z coordinate (depth)"
|
|
3149
|
-
}
|
|
3372
|
+
...AiImageOptionsProperties
|
|
3150
3373
|
},
|
|
3151
|
-
required: ["
|
|
3374
|
+
required: ["model", "prompt"],
|
|
3152
3375
|
additionalProperties: false
|
|
3153
3376
|
};
|
|
3377
|
+
var ImageGenerateOutputSchema = AiImageOutputSchema;
|
|
3378
|
+
|
|
3379
|
+
class ImageGenerateTask extends AiImageOutputTask {
|
|
3380
|
+
static type = "ImageGenerateTask";
|
|
3381
|
+
static category = "AI Vision";
|
|
3382
|
+
static title = "Generate Image";
|
|
3383
|
+
static description = "Generates an image from a text prompt using configurable AI image-generation models.";
|
|
3384
|
+
static cacheable = true;
|
|
3385
|
+
static inputSchema() {
|
|
3386
|
+
return ImageGenerateInputSchema;
|
|
3387
|
+
}
|
|
3388
|
+
static outputSchema() {
|
|
3389
|
+
return ImageGenerateOutputSchema;
|
|
3390
|
+
}
|
|
3391
|
+
async validateInput(input) {
|
|
3392
|
+
const ok = await super.validateInput(input);
|
|
3393
|
+
if (!ok)
|
|
3394
|
+
return false;
|
|
3395
|
+
await this.validateProviderImageInput(input);
|
|
3396
|
+
return true;
|
|
3397
|
+
}
|
|
3398
|
+
}
|
|
3399
|
+
var imageGenerate = (input, config) => new ImageGenerateTask(config).run(input);
|
|
3400
|
+
Workflow15.prototype.imageGenerate = CreateWorkflow15(ImageGenerateTask);
|
|
3401
|
+
|
|
3402
|
+
// src/task/GestureRecognizerTask.ts
|
|
3403
|
+
import { CreateWorkflow as CreateWorkflow16, Workflow as Workflow16 } from "@workglow/task-graph";
|
|
3404
|
+
var modelSchema13 = TypeModel("model:GestureRecognizerTask");
|
|
3154
3405
|
var TypeGesture = {
|
|
3155
3406
|
type: "object",
|
|
3156
3407
|
properties: {
|
|
@@ -3202,15 +3453,17 @@ var TypeHandGestureDetection = {
|
|
|
3202
3453
|
},
|
|
3203
3454
|
landmarks: {
|
|
3204
3455
|
type: "array",
|
|
3205
|
-
items:
|
|
3456
|
+
items: TypeLandmark,
|
|
3206
3457
|
title: "Landmarks",
|
|
3207
|
-
description: "21 hand landmarks in image coordinates"
|
|
3458
|
+
description: "21 hand landmarks in image coordinates",
|
|
3459
|
+
format: "points:3d:relative"
|
|
3208
3460
|
},
|
|
3209
3461
|
worldLandmarks: {
|
|
3210
3462
|
type: "array",
|
|
3211
|
-
items:
|
|
3463
|
+
items: TypeLandmark,
|
|
3212
3464
|
title: "World Landmarks",
|
|
3213
|
-
description: "21 hand landmarks in 3D world coordinates (meters)"
|
|
3465
|
+
description: "21 hand landmarks in 3D world coordinates (meters)",
|
|
3466
|
+
format: "points:3d:meters"
|
|
3214
3467
|
}
|
|
3215
3468
|
},
|
|
3216
3469
|
required: ["gestures", "handedness", "landmarks", "worldLandmarks"],
|
|
@@ -3220,7 +3473,7 @@ var GestureRecognizerInputSchema = {
|
|
|
3220
3473
|
type: "object",
|
|
3221
3474
|
properties: {
|
|
3222
3475
|
image: TypeImageInput,
|
|
3223
|
-
model:
|
|
3476
|
+
model: modelSchema13,
|
|
3224
3477
|
numHands: {
|
|
3225
3478
|
type: "number",
|
|
3226
3479
|
minimum: 1,
|
|
@@ -3279,7 +3532,7 @@ var GestureRecognizerOutputSchema = {
|
|
|
3279
3532
|
|
|
3280
3533
|
class GestureRecognizerTask extends AiVisionTask {
|
|
3281
3534
|
static type = "GestureRecognizerTask";
|
|
3282
|
-
static category = "AI Vision
|
|
3535
|
+
static category = "AI Vision";
|
|
3283
3536
|
static title = "Gesture Recognizer";
|
|
3284
3537
|
static description = "Recognizes hand gestures in images. Detects hand landmarks, identifies gestures (thumbs up, victory, etc.), and classifies handedness.";
|
|
3285
3538
|
static inputSchema() {
|
|
@@ -3292,33 +3545,11 @@ class GestureRecognizerTask extends AiVisionTask {
|
|
|
3292
3545
|
var gestureRecognizer = (input, config) => {
|
|
3293
3546
|
return new GestureRecognizerTask(config).run(input);
|
|
3294
3547
|
};
|
|
3295
|
-
|
|
3548
|
+
Workflow16.prototype.gestureRecognizer = CreateWorkflow16(GestureRecognizerTask);
|
|
3296
3549
|
|
|
3297
3550
|
// src/task/HandLandmarkerTask.ts
|
|
3298
|
-
import { CreateWorkflow as
|
|
3299
|
-
var
|
|
3300
|
-
var TypeLandmark3 = {
|
|
3301
|
-
type: "object",
|
|
3302
|
-
properties: {
|
|
3303
|
-
x: {
|
|
3304
|
-
type: "number",
|
|
3305
|
-
title: "X Coordinate",
|
|
3306
|
-
description: "X coordinate normalized to [0.0, 1.0]"
|
|
3307
|
-
},
|
|
3308
|
-
y: {
|
|
3309
|
-
type: "number",
|
|
3310
|
-
title: "Y Coordinate",
|
|
3311
|
-
description: "Y coordinate normalized to [0.0, 1.0]"
|
|
3312
|
-
},
|
|
3313
|
-
z: {
|
|
3314
|
-
type: "number",
|
|
3315
|
-
title: "Z Coordinate",
|
|
3316
|
-
description: "Z coordinate (depth)"
|
|
3317
|
-
}
|
|
3318
|
-
},
|
|
3319
|
-
required: ["x", "y", "z"],
|
|
3320
|
-
additionalProperties: false
|
|
3321
|
-
};
|
|
3551
|
+
import { CreateWorkflow as CreateWorkflow17, Workflow as Workflow17 } from "@workglow/task-graph";
|
|
3552
|
+
var modelSchema14 = TypeModel("model:HandLandmarkerTask");
|
|
3322
3553
|
var TypeHandedness2 = {
|
|
3323
3554
|
type: "object",
|
|
3324
3555
|
properties: {
|
|
@@ -3347,15 +3578,17 @@ var TypeHandDetection = {
|
|
|
3347
3578
|
},
|
|
3348
3579
|
landmarks: {
|
|
3349
3580
|
type: "array",
|
|
3350
|
-
items:
|
|
3581
|
+
items: TypeLandmark,
|
|
3351
3582
|
title: "Landmarks",
|
|
3352
|
-
description: "21 hand landmarks in image coordinates"
|
|
3583
|
+
description: "21 hand landmarks in image coordinates",
|
|
3584
|
+
format: "points:3d:relative"
|
|
3353
3585
|
},
|
|
3354
3586
|
worldLandmarks: {
|
|
3355
3587
|
type: "array",
|
|
3356
|
-
items:
|
|
3588
|
+
items: TypeLandmark,
|
|
3357
3589
|
title: "World Landmarks",
|
|
3358
|
-
description: "21 hand landmarks in 3D world coordinates (meters)"
|
|
3590
|
+
description: "21 hand landmarks in 3D world coordinates (meters)",
|
|
3591
|
+
format: "points:3d:meters"
|
|
3359
3592
|
}
|
|
3360
3593
|
},
|
|
3361
3594
|
required: ["handedness", "landmarks", "worldLandmarks"],
|
|
@@ -3365,7 +3598,7 @@ var HandLandmarkerInputSchema = {
|
|
|
3365
3598
|
type: "object",
|
|
3366
3599
|
properties: {
|
|
3367
3600
|
image: TypeImageInput,
|
|
3368
|
-
model:
|
|
3601
|
+
model: modelSchema14,
|
|
3369
3602
|
numHands: {
|
|
3370
3603
|
type: "number",
|
|
3371
3604
|
minimum: 1,
|
|
@@ -3424,7 +3657,7 @@ var HandLandmarkerOutputSchema = {
|
|
|
3424
3657
|
|
|
3425
3658
|
class HandLandmarkerTask extends AiVisionTask {
|
|
3426
3659
|
static type = "HandLandmarkerTask";
|
|
3427
|
-
static category = "AI Vision
|
|
3660
|
+
static category = "AI Vision";
|
|
3428
3661
|
static title = "Hand Landmarker";
|
|
3429
3662
|
static description = "Detects hand landmarks in images. Identifies 21 hand landmarks and classifies left vs. right hands.";
|
|
3430
3663
|
static inputSchema() {
|
|
@@ -3437,7 +3670,7 @@ class HandLandmarkerTask extends AiVisionTask {
|
|
|
3437
3670
|
var handLandmarker = (input, config) => {
|
|
3438
3671
|
return new HandLandmarkerTask(config).run(input);
|
|
3439
3672
|
};
|
|
3440
|
-
|
|
3673
|
+
Workflow17.prototype.handLandmarker = CreateWorkflow17(HandLandmarkerTask);
|
|
3441
3674
|
|
|
3442
3675
|
// src/task/HierarchicalChunkerTask.ts
|
|
3443
3676
|
import {
|
|
@@ -3446,9 +3679,9 @@ import {
|
|
|
3446
3679
|
getChildren as getChildren2,
|
|
3447
3680
|
hasChildren as hasChildren2
|
|
3448
3681
|
} from "@workglow/knowledge-base";
|
|
3449
|
-
import { CreateWorkflow as
|
|
3682
|
+
import { CreateWorkflow as CreateWorkflow18, Task as Task7, Workflow as Workflow18 } from "@workglow/task-graph";
|
|
3450
3683
|
import { uuid4 } from "@workglow/util";
|
|
3451
|
-
var
|
|
3684
|
+
var modelSchema15 = TypeModel("model", {
|
|
3452
3685
|
title: "Model",
|
|
3453
3686
|
description: "Model to use for token counting"
|
|
3454
3687
|
});
|
|
@@ -3494,7 +3727,7 @@ var inputSchema6 = {
|
|
|
3494
3727
|
description: "Strategy for chunking",
|
|
3495
3728
|
default: "hierarchical"
|
|
3496
3729
|
},
|
|
3497
|
-
model:
|
|
3730
|
+
model: modelSchema15
|
|
3498
3731
|
},
|
|
3499
3732
|
required: ["doc_id", "documentTree"],
|
|
3500
3733
|
additionalProperties: false
|
|
@@ -3673,11 +3906,11 @@ class HierarchicalChunkerTask extends Task7 {
|
|
|
3673
3906
|
var hierarchicalChunker = (input, config) => {
|
|
3674
3907
|
return new HierarchicalChunkerTask(config).run(input);
|
|
3675
3908
|
};
|
|
3676
|
-
|
|
3909
|
+
Workflow18.prototype.hierarchicalChunker = CreateWorkflow18(HierarchicalChunkerTask);
|
|
3677
3910
|
|
|
3678
3911
|
// src/task/HierarchyJoinTask.ts
|
|
3679
3912
|
import { ChunkRecordArraySchema as ChunkRecordArraySchema2, TypeKnowledgeBase as TypeKnowledgeBase4 } from "@workglow/knowledge-base";
|
|
3680
|
-
import { CreateWorkflow as
|
|
3913
|
+
import { CreateWorkflow as CreateWorkflow19, Task as Task8, Workflow as Workflow19 } from "@workglow/task-graph";
|
|
3681
3914
|
var inputSchema7 = {
|
|
3682
3915
|
type: "object",
|
|
3683
3916
|
properties: {
|
|
@@ -3848,11 +4081,11 @@ class HierarchyJoinTask extends Task8 {
|
|
|
3848
4081
|
var hierarchyJoin = (input, config) => {
|
|
3849
4082
|
return new HierarchyJoinTask(config).run(input);
|
|
3850
4083
|
};
|
|
3851
|
-
|
|
4084
|
+
Workflow19.prototype.hierarchyJoin = CreateWorkflow19(HierarchyJoinTask);
|
|
3852
4085
|
|
|
3853
4086
|
// src/task/KbToDocumentsTask.ts
|
|
3854
4087
|
import { TypeKnowledgeBase as TypeKnowledgeBase5 } from "@workglow/knowledge-base";
|
|
3855
|
-
import { CreateWorkflow as
|
|
4088
|
+
import { CreateWorkflow as CreateWorkflow20, Task as Task9, Workflow as Workflow20 } from "@workglow/task-graph";
|
|
3856
4089
|
var inputSchema8 = {
|
|
3857
4090
|
type: "object",
|
|
3858
4091
|
properties: {
|
|
@@ -3937,16 +4170,16 @@ class KbToDocumentsTask extends Task9 {
|
|
|
3937
4170
|
var kbToDocuments = (input, config) => {
|
|
3938
4171
|
return new KbToDocumentsTask(config).run(input);
|
|
3939
4172
|
};
|
|
3940
|
-
|
|
4173
|
+
Workflow20.prototype.kbToDocuments = CreateWorkflow20(KbToDocumentsTask);
|
|
3941
4174
|
|
|
3942
4175
|
// src/task/ImageClassificationTask.ts
|
|
3943
|
-
import { CreateWorkflow as
|
|
3944
|
-
var
|
|
4176
|
+
import { CreateWorkflow as CreateWorkflow21, Workflow as Workflow21 } from "@workglow/task-graph";
|
|
4177
|
+
var modelSchema16 = TypeModel("model:ImageClassificationTask");
|
|
3945
4178
|
var ImageClassificationInputSchema = {
|
|
3946
4179
|
type: "object",
|
|
3947
4180
|
properties: {
|
|
3948
4181
|
image: TypeImageInput,
|
|
3949
|
-
model:
|
|
4182
|
+
model: modelSchema16,
|
|
3950
4183
|
categories: {
|
|
3951
4184
|
type: "array",
|
|
3952
4185
|
items: {
|
|
@@ -3987,7 +4220,7 @@ var ImageClassificationOutputSchema = {
|
|
|
3987
4220
|
|
|
3988
4221
|
class ImageClassificationTask extends AiVisionTask {
|
|
3989
4222
|
static type = "ImageClassificationTask";
|
|
3990
|
-
static category = "AI Vision
|
|
4223
|
+
static category = "AI Vision";
|
|
3991
4224
|
static title = "Image Classification";
|
|
3992
4225
|
static description = "Classifies images into categories using vision models. Supports zero-shot classification when categories are provided.";
|
|
3993
4226
|
static inputSchema() {
|
|
@@ -4000,19 +4233,19 @@ class ImageClassificationTask extends AiVisionTask {
|
|
|
4000
4233
|
var imageClassification = (input, config) => {
|
|
4001
4234
|
return new ImageClassificationTask(config).run(input);
|
|
4002
4235
|
};
|
|
4003
|
-
|
|
4236
|
+
Workflow21.prototype.imageClassification = CreateWorkflow21(ImageClassificationTask);
|
|
4004
4237
|
|
|
4005
4238
|
// src/task/ImageEmbeddingTask.ts
|
|
4006
|
-
import { CreateWorkflow as
|
|
4239
|
+
import { CreateWorkflow as CreateWorkflow22, Workflow as Workflow22 } from "@workglow/task-graph";
|
|
4007
4240
|
import {
|
|
4008
4241
|
TypedArraySchema as TypedArraySchema4
|
|
4009
4242
|
} from "@workglow/util/schema";
|
|
4010
|
-
var
|
|
4243
|
+
var modelSchema17 = TypeModel("model:ImageEmbeddingTask");
|
|
4011
4244
|
var ImageEmbeddingInputSchema = {
|
|
4012
4245
|
type: "object",
|
|
4013
4246
|
properties: {
|
|
4014
4247
|
image: TypeSingleOrArray(TypeImageInput),
|
|
4015
|
-
model:
|
|
4248
|
+
model: modelSchema17
|
|
4016
4249
|
},
|
|
4017
4250
|
required: ["image", "model"],
|
|
4018
4251
|
additionalProperties: false
|
|
@@ -4031,7 +4264,7 @@ var ImageEmbeddingOutputSchema = {
|
|
|
4031
4264
|
|
|
4032
4265
|
class ImageEmbeddingTask extends AiVisionTask {
|
|
4033
4266
|
static type = "ImageEmbeddingTask";
|
|
4034
|
-
static category = "AI Vision
|
|
4267
|
+
static category = "AI Vision";
|
|
4035
4268
|
static title = "Image Embedding";
|
|
4036
4269
|
static description = "Generates embeddings from images using vision models";
|
|
4037
4270
|
static inputSchema() {
|
|
@@ -4044,16 +4277,16 @@ class ImageEmbeddingTask extends AiVisionTask {
|
|
|
4044
4277
|
var imageEmbedding = (input, config) => {
|
|
4045
4278
|
return new ImageEmbeddingTask(config).run(input);
|
|
4046
4279
|
};
|
|
4047
|
-
|
|
4280
|
+
Workflow22.prototype.imageEmbedding = CreateWorkflow22(ImageEmbeddingTask);
|
|
4048
4281
|
|
|
4049
4282
|
// src/task/ImageSegmentationTask.ts
|
|
4050
|
-
import { CreateWorkflow as
|
|
4051
|
-
var
|
|
4283
|
+
import { CreateWorkflow as CreateWorkflow23, Workflow as Workflow23 } from "@workglow/task-graph";
|
|
4284
|
+
var modelSchema18 = TypeModel("model:ImageSegmentationTask");
|
|
4052
4285
|
var ImageSegmentationInputSchema = {
|
|
4053
4286
|
type: "object",
|
|
4054
4287
|
properties: {
|
|
4055
4288
|
image: TypeImageInput,
|
|
4056
|
-
model:
|
|
4289
|
+
model: modelSchema18,
|
|
4057
4290
|
threshold: {
|
|
4058
4291
|
type: "number",
|
|
4059
4292
|
title: "Threshold",
|
|
@@ -4119,7 +4352,7 @@ var ImageSegmentationOutputSchema = {
|
|
|
4119
4352
|
|
|
4120
4353
|
class ImageSegmentationTask extends AiVisionTask {
|
|
4121
4354
|
static type = "ImageSegmentationTask";
|
|
4122
|
-
static category = "AI Vision
|
|
4355
|
+
static category = "AI Vision";
|
|
4123
4356
|
static title = "Image Segmentation";
|
|
4124
4357
|
static description = "Segments images into regions with labels using computer vision models";
|
|
4125
4358
|
static inputSchema() {
|
|
@@ -4132,11 +4365,11 @@ class ImageSegmentationTask extends AiVisionTask {
|
|
|
4132
4365
|
var imageSegmentation = (input, config) => {
|
|
4133
4366
|
return new ImageSegmentationTask(config).run(input);
|
|
4134
4367
|
};
|
|
4135
|
-
|
|
4368
|
+
Workflow23.prototype.imageSegmentation = CreateWorkflow23(ImageSegmentationTask);
|
|
4136
4369
|
|
|
4137
4370
|
// src/task/ImageToTextTask.ts
|
|
4138
|
-
import { CreateWorkflow as
|
|
4139
|
-
var
|
|
4371
|
+
import { CreateWorkflow as CreateWorkflow24, Workflow as Workflow24 } from "@workglow/task-graph";
|
|
4372
|
+
var modelSchema19 = TypeModel("model:ImageToTextTask");
|
|
4140
4373
|
var generatedTextSchema = {
|
|
4141
4374
|
type: "string",
|
|
4142
4375
|
title: "Text",
|
|
@@ -4146,7 +4379,7 @@ var ImageToTextInputSchema = {
|
|
|
4146
4379
|
type: "object",
|
|
4147
4380
|
properties: {
|
|
4148
4381
|
image: TypeImageInput,
|
|
4149
|
-
model:
|
|
4382
|
+
model: modelSchema19,
|
|
4150
4383
|
maxTokens: {
|
|
4151
4384
|
type: "number",
|
|
4152
4385
|
title: "Max Tokens",
|
|
@@ -4174,7 +4407,7 @@ var ImageToTextOutputSchema = {
|
|
|
4174
4407
|
|
|
4175
4408
|
class ImageToTextTask extends AiVisionTask {
|
|
4176
4409
|
static type = "ImageToTextTask";
|
|
4177
|
-
static category = "AI Vision
|
|
4410
|
+
static category = "AI Vision";
|
|
4178
4411
|
static title = "Image to Text";
|
|
4179
4412
|
static description = "Generates text descriptions from images using vision-language models";
|
|
4180
4413
|
static inputSchema() {
|
|
@@ -4187,15 +4420,15 @@ class ImageToTextTask extends AiVisionTask {
|
|
|
4187
4420
|
var imageToText = (input, config) => {
|
|
4188
4421
|
return new ImageToTextTask(config).run(input);
|
|
4189
4422
|
};
|
|
4190
|
-
|
|
4423
|
+
Workflow24.prototype.imageToText = CreateWorkflow24(ImageToTextTask);
|
|
4191
4424
|
|
|
4192
4425
|
// src/task/ModelInfoTask.ts
|
|
4193
|
-
import { CreateWorkflow as
|
|
4194
|
-
var
|
|
4426
|
+
import { CreateWorkflow as CreateWorkflow25, Workflow as Workflow25 } from "@workglow/task-graph";
|
|
4427
|
+
var modelSchema20 = TypeModel("model");
|
|
4195
4428
|
var ModelInfoInputSchema = {
|
|
4196
4429
|
type: "object",
|
|
4197
4430
|
properties: {
|
|
4198
|
-
model:
|
|
4431
|
+
model: modelSchema20,
|
|
4199
4432
|
detail: {
|
|
4200
4433
|
type: "string",
|
|
4201
4434
|
enum: ["cached_status", "files", "files_with_metadata", "dimensions"],
|
|
@@ -4208,7 +4441,7 @@ var ModelInfoInputSchema = {
|
|
|
4208
4441
|
var ModelInfoOutputSchema = {
|
|
4209
4442
|
type: "object",
|
|
4210
4443
|
properties: {
|
|
4211
|
-
model:
|
|
4444
|
+
model: modelSchema20,
|
|
4212
4445
|
is_local: { type: "boolean" },
|
|
4213
4446
|
is_remote: { type: "boolean" },
|
|
4214
4447
|
supports_browser: { type: "boolean" },
|
|
@@ -4266,10 +4499,10 @@ class ModelInfoTask extends AiTask {
|
|
|
4266
4499
|
var modelInfo = (input, config) => {
|
|
4267
4500
|
return new ModelInfoTask(config).run(input);
|
|
4268
4501
|
};
|
|
4269
|
-
|
|
4502
|
+
Workflow25.prototype.modelInfo = CreateWorkflow25(ModelInfoTask);
|
|
4270
4503
|
|
|
4271
4504
|
// src/task/ModelSearchTask.ts
|
|
4272
|
-
import { CreateWorkflow as
|
|
4505
|
+
import { CreateWorkflow as CreateWorkflow26, Task as Task10, Workflow as Workflow26 } from "@workglow/task-graph";
|
|
4273
4506
|
var ModelSearchInputSchema = {
|
|
4274
4507
|
type: "object",
|
|
4275
4508
|
properties: {
|
|
@@ -4360,11 +4593,11 @@ class ModelSearchTask extends Task10 {
|
|
|
4360
4593
|
var modelSearch = (input, config) => {
|
|
4361
4594
|
return new ModelSearchTask(config).run(input);
|
|
4362
4595
|
};
|
|
4363
|
-
|
|
4596
|
+
Workflow26.prototype.modelSearch = CreateWorkflow26(ModelSearchTask);
|
|
4364
4597
|
|
|
4365
4598
|
// src/task/ObjectDetectionTask.ts
|
|
4366
|
-
import { CreateWorkflow as
|
|
4367
|
-
var
|
|
4599
|
+
import { CreateWorkflow as CreateWorkflow27, Workflow as Workflow27 } from "@workglow/task-graph";
|
|
4600
|
+
var modelSchema21 = TypeModel("model:ObjectDetectionTask");
|
|
4368
4601
|
var detectionSchema = {
|
|
4369
4602
|
type: "object",
|
|
4370
4603
|
properties: {
|
|
@@ -4389,7 +4622,7 @@ var ObjectDetectionInputSchema = {
|
|
|
4389
4622
|
type: "object",
|
|
4390
4623
|
properties: {
|
|
4391
4624
|
image: TypeImageInput,
|
|
4392
|
-
model:
|
|
4625
|
+
model: modelSchema21,
|
|
4393
4626
|
labels: {
|
|
4394
4627
|
type: "array",
|
|
4395
4628
|
items: {
|
|
@@ -4430,7 +4663,7 @@ var ObjectDetectionOutputSchema = {
|
|
|
4430
4663
|
|
|
4431
4664
|
class ObjectDetectionTask extends AiVisionTask {
|
|
4432
4665
|
static type = "ObjectDetectionTask";
|
|
4433
|
-
static category = "AI Vision
|
|
4666
|
+
static category = "AI Vision";
|
|
4434
4667
|
static title = "Object Detection";
|
|
4435
4668
|
static description = "Detects objects in images using vision models. Supports zero-shot detection when labels are provided.";
|
|
4436
4669
|
static inputSchema() {
|
|
@@ -4443,43 +4676,11 @@ class ObjectDetectionTask extends AiVisionTask {
|
|
|
4443
4676
|
var objectDetection = (input, config) => {
|
|
4444
4677
|
return new ObjectDetectionTask(config).run(input);
|
|
4445
4678
|
};
|
|
4446
|
-
|
|
4679
|
+
Workflow27.prototype.objectDetection = CreateWorkflow27(ObjectDetectionTask);
|
|
4447
4680
|
|
|
4448
4681
|
// src/task/PoseLandmarkerTask.ts
|
|
4449
|
-
import { CreateWorkflow as
|
|
4450
|
-
var
|
|
4451
|
-
var TypePoseLandmark = {
|
|
4452
|
-
type: "object",
|
|
4453
|
-
properties: {
|
|
4454
|
-
x: {
|
|
4455
|
-
type: "number",
|
|
4456
|
-
title: "X Coordinate",
|
|
4457
|
-
description: "X coordinate normalized to [0.0, 1.0]"
|
|
4458
|
-
},
|
|
4459
|
-
y: {
|
|
4460
|
-
type: "number",
|
|
4461
|
-
title: "Y Coordinate",
|
|
4462
|
-
description: "Y coordinate normalized to [0.0, 1.0]"
|
|
4463
|
-
},
|
|
4464
|
-
z: {
|
|
4465
|
-
type: "number",
|
|
4466
|
-
title: "Z Coordinate",
|
|
4467
|
-
description: "Z coordinate (depth)"
|
|
4468
|
-
},
|
|
4469
|
-
visibility: {
|
|
4470
|
-
type: "number",
|
|
4471
|
-
title: "Visibility",
|
|
4472
|
-
description: "Likelihood of the landmark being visible within the image"
|
|
4473
|
-
},
|
|
4474
|
-
presence: {
|
|
4475
|
-
type: "number",
|
|
4476
|
-
title: "Presence",
|
|
4477
|
-
description: "Likelihood of the landmark being present in the image"
|
|
4478
|
-
}
|
|
4479
|
-
},
|
|
4480
|
-
required: ["x", "y", "z"],
|
|
4481
|
-
additionalProperties: false
|
|
4482
|
-
};
|
|
4682
|
+
import { CreateWorkflow as CreateWorkflow28, Workflow as Workflow28 } from "@workglow/task-graph";
|
|
4683
|
+
var modelSchema22 = TypeModel("model:PoseLandmarkerTask");
|
|
4483
4684
|
var TypeSegmentationMask = {
|
|
4484
4685
|
type: "object",
|
|
4485
4686
|
properties: {
|
|
@@ -4526,7 +4727,7 @@ var PoseLandmarkerInputSchema = {
|
|
|
4526
4727
|
type: "object",
|
|
4527
4728
|
properties: {
|
|
4528
4729
|
image: TypeImageInput,
|
|
4529
|
-
model:
|
|
4730
|
+
model: modelSchema22,
|
|
4530
4731
|
numPoses: {
|
|
4531
4732
|
type: "number",
|
|
4532
4733
|
minimum: 1,
|
|
@@ -4592,7 +4793,7 @@ var PoseLandmarkerOutputSchema = {
|
|
|
4592
4793
|
|
|
4593
4794
|
class PoseLandmarkerTask extends AiVisionTask {
|
|
4594
4795
|
static type = "PoseLandmarkerTask";
|
|
4595
|
-
static category = "AI Vision
|
|
4796
|
+
static category = "AI Vision";
|
|
4596
4797
|
static title = "Pose Landmarker";
|
|
4597
4798
|
static description = "Detects pose landmarks in images. Identifies 33 body landmarks for pose estimation and optional segmentation.";
|
|
4598
4799
|
static inputSchema() {
|
|
@@ -4605,10 +4806,10 @@ class PoseLandmarkerTask extends AiVisionTask {
|
|
|
4605
4806
|
var poseLandmarker = (input, config) => {
|
|
4606
4807
|
return new PoseLandmarkerTask(config).run(input);
|
|
4607
4808
|
};
|
|
4608
|
-
|
|
4809
|
+
Workflow28.prototype.poseLandmarker = CreateWorkflow28(PoseLandmarkerTask);
|
|
4609
4810
|
|
|
4610
4811
|
// src/task/QueryExpanderTask.ts
|
|
4611
|
-
import { CreateWorkflow as
|
|
4812
|
+
import { CreateWorkflow as CreateWorkflow29, Task as Task11, Workflow as Workflow29 } from "@workglow/task-graph";
|
|
4612
4813
|
var QueryExpansionMethod = {
|
|
4613
4814
|
MULTI_QUERY: "multi-query",
|
|
4614
4815
|
SYNONYMS: "synonyms"
|
|
@@ -4778,10 +4979,10 @@ class QueryExpanderTask extends Task11 {
|
|
|
4778
4979
|
var queryExpander = (input, config) => {
|
|
4779
4980
|
return new QueryExpanderTask(config).run(input);
|
|
4780
4981
|
};
|
|
4781
|
-
|
|
4982
|
+
Workflow29.prototype.queryExpander = CreateWorkflow29(QueryExpanderTask);
|
|
4782
4983
|
|
|
4783
4984
|
// src/task/RerankerTask.ts
|
|
4784
|
-
import { CreateWorkflow as
|
|
4985
|
+
import { CreateWorkflow as CreateWorkflow30, Task as Task12, Workflow as Workflow30 } from "@workglow/task-graph";
|
|
4785
4986
|
var inputSchema10 = {
|
|
4786
4987
|
type: "object",
|
|
4787
4988
|
properties: {
|
|
@@ -4943,11 +5144,11 @@ class RerankerTask extends Task12 {
|
|
|
4943
5144
|
var reranker = (input, config) => {
|
|
4944
5145
|
return new RerankerTask(config).run(input);
|
|
4945
5146
|
};
|
|
4946
|
-
|
|
5147
|
+
Workflow30.prototype.reranker = CreateWorkflow30(RerankerTask);
|
|
4947
5148
|
|
|
4948
5149
|
// src/task/StructuralParserTask.ts
|
|
4949
5150
|
import { StructuralParser } from "@workglow/knowledge-base";
|
|
4950
|
-
import { CreateWorkflow as
|
|
5151
|
+
import { CreateWorkflow as CreateWorkflow31, Task as Task13, Workflow as Workflow31 } from "@workglow/task-graph";
|
|
4951
5152
|
import { uuid4 as uuid42 } from "@workglow/util";
|
|
4952
5153
|
var inputSchema11 = {
|
|
4953
5154
|
type: "object",
|
|
@@ -5050,16 +5251,16 @@ class StructuralParserTask extends Task13 {
|
|
|
5050
5251
|
var structuralParser = (input, config) => {
|
|
5051
5252
|
return new StructuralParserTask(config).run(input);
|
|
5052
5253
|
};
|
|
5053
|
-
|
|
5254
|
+
Workflow31.prototype.structuralParser = CreateWorkflow31(StructuralParserTask);
|
|
5054
5255
|
|
|
5055
5256
|
// src/task/StructuredGenerationTask.ts
|
|
5056
|
-
import { CreateWorkflow as
|
|
5257
|
+
import { CreateWorkflow as CreateWorkflow32, TaskConfigurationError as TaskConfigurationError4, TaskError, Workflow as Workflow32 } from "@workglow/task-graph";
|
|
5057
5258
|
import { compileSchema as compileSchema2 } from "@workglow/util/schema";
|
|
5058
|
-
var
|
|
5259
|
+
var modelSchema23 = TypeModel("model:StructuredGenerationTask");
|
|
5059
5260
|
var StructuredGenerationInputSchema = {
|
|
5060
5261
|
type: "object",
|
|
5061
5262
|
properties: {
|
|
5062
|
-
model:
|
|
5263
|
+
model: modelSchema23,
|
|
5063
5264
|
prompt: {
|
|
5064
5265
|
type: "string",
|
|
5065
5266
|
title: "Prompt",
|
|
@@ -5142,7 +5343,8 @@ ${errorList}
|
|
|
5142
5343
|
|
|
5143
5344
|
class StructuredGenerationTask extends StreamingAiTask {
|
|
5144
5345
|
static type = "StructuredGenerationTask";
|
|
5145
|
-
static
|
|
5346
|
+
static streamingPhaseLabel = "Generating";
|
|
5347
|
+
static category = "AI Text";
|
|
5146
5348
|
static title = "Structured Generation";
|
|
5147
5349
|
static description = "Generates structured JSON output conforming to a provided schema using language models, with automatic validation and retry on mismatch";
|
|
5148
5350
|
static inputSchema() {
|
|
@@ -5227,11 +5429,11 @@ class StructuredGenerationTask extends StreamingAiTask {
|
|
|
5227
5429
|
var structuredGeneration = (input, config) => {
|
|
5228
5430
|
return new StructuredGenerationTask(config).run(input);
|
|
5229
5431
|
};
|
|
5230
|
-
|
|
5432
|
+
Workflow32.prototype.structuredGeneration = CreateWorkflow32(StructuredGenerationTask);
|
|
5231
5433
|
|
|
5232
5434
|
// src/task/TextChunkerTask.ts
|
|
5233
5435
|
import { ChunkRecordArraySchema as ChunkRecordArraySchema3 } from "@workglow/knowledge-base";
|
|
5234
|
-
import { CreateWorkflow as
|
|
5436
|
+
import { CreateWorkflow as CreateWorkflow33, Task as Task14, Workflow as Workflow33 } from "@workglow/task-graph";
|
|
5235
5437
|
var ChunkingStrategy = {
|
|
5236
5438
|
FIXED: "fixed",
|
|
5237
5439
|
SENTENCE: "sentence",
|
|
@@ -5481,11 +5683,11 @@ class TextChunkerTask extends Task14 {
|
|
|
5481
5683
|
var textChunker = (input, config) => {
|
|
5482
5684
|
return new TextChunkerTask(config).run(input);
|
|
5483
5685
|
};
|
|
5484
|
-
|
|
5686
|
+
Workflow33.prototype.textChunker = CreateWorkflow33(TextChunkerTask);
|
|
5485
5687
|
|
|
5486
5688
|
// src/task/TextClassificationTask.ts
|
|
5487
|
-
import { CreateWorkflow as
|
|
5488
|
-
var
|
|
5689
|
+
import { CreateWorkflow as CreateWorkflow34, Workflow as Workflow34 } from "@workglow/task-graph";
|
|
5690
|
+
var modelSchema24 = TypeModel("model:TextClassificationTask");
|
|
5489
5691
|
var TextClassificationInputSchema = {
|
|
5490
5692
|
type: "object",
|
|
5491
5693
|
properties: {
|
|
@@ -5512,7 +5714,7 @@ var TextClassificationInputSchema = {
|
|
|
5512
5714
|
description: "The maximum number of categories to return",
|
|
5513
5715
|
"x-ui-group": "Configuration"
|
|
5514
5716
|
},
|
|
5515
|
-
model:
|
|
5717
|
+
model: modelSchema24
|
|
5516
5718
|
},
|
|
5517
5719
|
required: ["text", "model"],
|
|
5518
5720
|
additionalProperties: false
|
|
@@ -5549,7 +5751,7 @@ var TextClassificationOutputSchema = {
|
|
|
5549
5751
|
|
|
5550
5752
|
class TextClassificationTask extends AiTask {
|
|
5551
5753
|
static type = "TextClassificationTask";
|
|
5552
|
-
static category = "AI Text
|
|
5754
|
+
static category = "AI Text";
|
|
5553
5755
|
static title = "Text Classifier";
|
|
5554
5756
|
static description = "Classifies text into categories using language models. Supports zero-shot classification when candidate labels are provided.";
|
|
5555
5757
|
static inputSchema() {
|
|
@@ -5562,11 +5764,11 @@ class TextClassificationTask extends AiTask {
|
|
|
5562
5764
|
var textClassification = (input, config) => {
|
|
5563
5765
|
return new TextClassificationTask(config).run(input);
|
|
5564
5766
|
};
|
|
5565
|
-
|
|
5767
|
+
Workflow34.prototype.textClassification = CreateWorkflow34(TextClassificationTask);
|
|
5566
5768
|
|
|
5567
5769
|
// src/task/TextFillMaskTask.ts
|
|
5568
|
-
import { CreateWorkflow as
|
|
5569
|
-
var
|
|
5770
|
+
import { CreateWorkflow as CreateWorkflow35, Workflow as Workflow35 } from "@workglow/task-graph";
|
|
5771
|
+
var modelSchema25 = TypeModel("model:TextFillMaskTask");
|
|
5570
5772
|
var TextFillMaskInputSchema = {
|
|
5571
5773
|
type: "object",
|
|
5572
5774
|
properties: {
|
|
@@ -5575,7 +5777,7 @@ var TextFillMaskInputSchema = {
|
|
|
5575
5777
|
title: "Text",
|
|
5576
5778
|
description: "The text with a mask token to fill"
|
|
5577
5779
|
},
|
|
5578
|
-
model:
|
|
5780
|
+
model: modelSchema25
|
|
5579
5781
|
},
|
|
5580
5782
|
required: ["text", "model"],
|
|
5581
5783
|
additionalProperties: false
|
|
@@ -5617,7 +5819,7 @@ var TextFillMaskOutputSchema = {
|
|
|
5617
5819
|
|
|
5618
5820
|
class TextFillMaskTask extends AiTask {
|
|
5619
5821
|
static type = "TextFillMaskTask";
|
|
5620
|
-
static category = "AI Text
|
|
5822
|
+
static category = "AI Text";
|
|
5621
5823
|
static title = "Fill Mask";
|
|
5622
5824
|
static description = "Fills masked tokens in text";
|
|
5623
5825
|
static inputSchema() {
|
|
@@ -5630,21 +5832,21 @@ class TextFillMaskTask extends AiTask {
|
|
|
5630
5832
|
var textFillMask = (input, config) => {
|
|
5631
5833
|
return new TextFillMaskTask(config).run(input);
|
|
5632
5834
|
};
|
|
5633
|
-
|
|
5835
|
+
Workflow35.prototype.textFillMask = CreateWorkflow35(TextFillMaskTask);
|
|
5634
5836
|
|
|
5635
5837
|
// src/task/TextGenerationTask.ts
|
|
5636
|
-
import { CreateWorkflow as
|
|
5838
|
+
import { CreateWorkflow as CreateWorkflow36, Workflow as Workflow36 } from "@workglow/task-graph";
|
|
5637
5839
|
var generatedTextSchema2 = {
|
|
5638
5840
|
type: "string",
|
|
5639
5841
|
title: "Text",
|
|
5640
5842
|
description: "The generated text",
|
|
5641
5843
|
"x-stream": "append"
|
|
5642
5844
|
};
|
|
5643
|
-
var
|
|
5845
|
+
var modelSchema26 = TypeModel("model:TextGenerationTask");
|
|
5644
5846
|
var TextGenerationInputSchema = {
|
|
5645
5847
|
type: "object",
|
|
5646
5848
|
properties: {
|
|
5647
|
-
model:
|
|
5849
|
+
model: modelSchema26,
|
|
5648
5850
|
prompt: {
|
|
5649
5851
|
type: "string",
|
|
5650
5852
|
title: "Prompt",
|
|
@@ -5705,7 +5907,8 @@ var TextGenerationOutputSchema = {
|
|
|
5705
5907
|
|
|
5706
5908
|
class TextGenerationTask extends StreamingAiTask {
|
|
5707
5909
|
static type = "TextGenerationTask";
|
|
5708
|
-
static
|
|
5910
|
+
static streamingPhaseLabel = "Generating";
|
|
5911
|
+
static category = "AI Text";
|
|
5709
5912
|
static title = "Text Generation";
|
|
5710
5913
|
static description = "Generates text from a prompt using language models with configurable parameters";
|
|
5711
5914
|
static inputSchema() {
|
|
@@ -5718,11 +5921,11 @@ class TextGenerationTask extends StreamingAiTask {
|
|
|
5718
5921
|
var textGeneration = (input, config) => {
|
|
5719
5922
|
return new TextGenerationTask(config).run(input);
|
|
5720
5923
|
};
|
|
5721
|
-
|
|
5924
|
+
Workflow36.prototype.textGeneration = CreateWorkflow36(TextGenerationTask);
|
|
5722
5925
|
|
|
5723
5926
|
// src/task/TextLanguageDetectionTask.ts
|
|
5724
|
-
import { CreateWorkflow as
|
|
5725
|
-
var
|
|
5927
|
+
import { CreateWorkflow as CreateWorkflow37, Workflow as Workflow37 } from "@workglow/task-graph";
|
|
5928
|
+
var modelSchema27 = TypeModel("model:TextLanguageDetectionTask");
|
|
5726
5929
|
var TextLanguageDetectionInputSchema = {
|
|
5727
5930
|
type: "object",
|
|
5728
5931
|
properties: {
|
|
@@ -5739,7 +5942,7 @@ var TextLanguageDetectionInputSchema = {
|
|
|
5739
5942
|
title: "Max Languages",
|
|
5740
5943
|
description: "The maximum number of languages to return"
|
|
5741
5944
|
},
|
|
5742
|
-
model:
|
|
5945
|
+
model: modelSchema27
|
|
5743
5946
|
},
|
|
5744
5947
|
required: ["text", "model"],
|
|
5745
5948
|
additionalProperties: false
|
|
@@ -5776,7 +5979,7 @@ var TextLanguageDetectionOutputSchema = {
|
|
|
5776
5979
|
|
|
5777
5980
|
class TextLanguageDetectionTask extends AiTask {
|
|
5778
5981
|
static type = "TextLanguageDetectionTask";
|
|
5779
|
-
static category = "AI Text
|
|
5982
|
+
static category = "AI Text";
|
|
5780
5983
|
static title = "Language Detection";
|
|
5781
5984
|
static description = "Detects the language of text using language models";
|
|
5782
5985
|
static inputSchema() {
|
|
@@ -5789,10 +5992,10 @@ class TextLanguageDetectionTask extends AiTask {
|
|
|
5789
5992
|
var textLanguageDetection = (input, config) => {
|
|
5790
5993
|
return new TextLanguageDetectionTask(config).run(input);
|
|
5791
5994
|
};
|
|
5792
|
-
|
|
5995
|
+
Workflow37.prototype.textLanguageDetection = CreateWorkflow37(TextLanguageDetectionTask);
|
|
5793
5996
|
|
|
5794
5997
|
// src/task/TextQuestionAnswerTask.ts
|
|
5795
|
-
import { CreateWorkflow as
|
|
5998
|
+
import { CreateWorkflow as CreateWorkflow38, Workflow as Workflow38 } from "@workglow/task-graph";
|
|
5796
5999
|
var contextSchema = {
|
|
5797
6000
|
type: "string",
|
|
5798
6001
|
title: "Context",
|
|
@@ -5809,13 +6012,13 @@ var textSchema = {
|
|
|
5809
6012
|
description: "The generated text",
|
|
5810
6013
|
"x-stream": "append"
|
|
5811
6014
|
};
|
|
5812
|
-
var
|
|
6015
|
+
var modelSchema28 = TypeModel("model:TextQuestionAnswerTask");
|
|
5813
6016
|
var TextQuestionAnswerInputSchema = {
|
|
5814
6017
|
type: "object",
|
|
5815
6018
|
properties: {
|
|
5816
6019
|
context: contextSchema,
|
|
5817
6020
|
question: questionSchema,
|
|
5818
|
-
model:
|
|
6021
|
+
model: modelSchema28
|
|
5819
6022
|
},
|
|
5820
6023
|
required: ["context", "question", "model"],
|
|
5821
6024
|
additionalProperties: false
|
|
@@ -5831,7 +6034,8 @@ var TextQuestionAnswerOutputSchema = {
|
|
|
5831
6034
|
|
|
5832
6035
|
class TextQuestionAnswerTask extends StreamingAiTask {
|
|
5833
6036
|
static type = "TextQuestionAnswerTask";
|
|
5834
|
-
static
|
|
6037
|
+
static streamingPhaseLabel = "Answering";
|
|
6038
|
+
static category = "AI Text";
|
|
5835
6039
|
static title = "Text Question Answer";
|
|
5836
6040
|
static description = "Answers questions based on provided context using language models";
|
|
5837
6041
|
static inputSchema() {
|
|
@@ -5844,11 +6048,11 @@ class TextQuestionAnswerTask extends StreamingAiTask {
|
|
|
5844
6048
|
var textQuestionAnswer = (input, config) => {
|
|
5845
6049
|
return new TextQuestionAnswerTask(config).run(input);
|
|
5846
6050
|
};
|
|
5847
|
-
|
|
6051
|
+
Workflow38.prototype.textQuestionAnswer = CreateWorkflow38(TextQuestionAnswerTask);
|
|
5848
6052
|
|
|
5849
6053
|
// src/task/TextRewriterTask.ts
|
|
5850
|
-
import { CreateWorkflow as
|
|
5851
|
-
var
|
|
6054
|
+
import { CreateWorkflow as CreateWorkflow39, Workflow as Workflow39 } from "@workglow/task-graph";
|
|
6055
|
+
var modelSchema29 = TypeModel("model:TextRewriterTask");
|
|
5852
6056
|
var TextRewriterInputSchema = {
|
|
5853
6057
|
type: "object",
|
|
5854
6058
|
properties: {
|
|
@@ -5862,7 +6066,7 @@ var TextRewriterInputSchema = {
|
|
|
5862
6066
|
title: "Prompt",
|
|
5863
6067
|
description: "The prompt to direct the rewriting"
|
|
5864
6068
|
},
|
|
5865
|
-
model:
|
|
6069
|
+
model: modelSchema29
|
|
5866
6070
|
},
|
|
5867
6071
|
required: ["text", "prompt", "model"],
|
|
5868
6072
|
additionalProperties: false
|
|
@@ -5883,7 +6087,8 @@ var TextRewriterOutputSchema = {
|
|
|
5883
6087
|
|
|
5884
6088
|
class TextRewriterTask extends StreamingAiTask {
|
|
5885
6089
|
static type = "TextRewriterTask";
|
|
5886
|
-
static
|
|
6090
|
+
static streamingPhaseLabel = "Rewriting";
|
|
6091
|
+
static category = "AI Text";
|
|
5887
6092
|
static title = "Text Rewriter";
|
|
5888
6093
|
static description = "Rewrites text according to a given prompt using language models";
|
|
5889
6094
|
static inputSchema() {
|
|
@@ -5896,11 +6101,11 @@ class TextRewriterTask extends StreamingAiTask {
|
|
|
5896
6101
|
var textRewriter = (input, config) => {
|
|
5897
6102
|
return new TextRewriterTask(config).run(input);
|
|
5898
6103
|
};
|
|
5899
|
-
|
|
6104
|
+
Workflow39.prototype.textRewriter = CreateWorkflow39(TextRewriterTask);
|
|
5900
6105
|
|
|
5901
6106
|
// src/task/TextTranslationTask.ts
|
|
5902
|
-
import { CreateWorkflow as
|
|
5903
|
-
var
|
|
6107
|
+
import { CreateWorkflow as CreateWorkflow40, Workflow as Workflow40 } from "@workglow/task-graph";
|
|
6108
|
+
var modelSchema30 = TypeModel("model:TextTranslationTask");
|
|
5904
6109
|
var translationTextSchema = {
|
|
5905
6110
|
type: "string",
|
|
5906
6111
|
title: "Text",
|
|
@@ -5927,7 +6132,7 @@ var TextTranslationInputSchema = {
|
|
|
5927
6132
|
minLength: 2,
|
|
5928
6133
|
maxLength: 2
|
|
5929
6134
|
}),
|
|
5930
|
-
model:
|
|
6135
|
+
model: modelSchema30
|
|
5931
6136
|
},
|
|
5932
6137
|
required: ["text", "source_lang", "target_lang", "model"],
|
|
5933
6138
|
additionalProperties: false
|
|
@@ -5949,7 +6154,8 @@ var TextTranslationOutputSchema = {
|
|
|
5949
6154
|
|
|
5950
6155
|
class TextTranslationTask extends StreamingAiTask {
|
|
5951
6156
|
static type = "TextTranslationTask";
|
|
5952
|
-
static
|
|
6157
|
+
static streamingPhaseLabel = "Translating";
|
|
6158
|
+
static category = "AI Text";
|
|
5953
6159
|
static title = "Text Translation";
|
|
5954
6160
|
static description = "Translates text from one language to another using language models";
|
|
5955
6161
|
static inputSchema() {
|
|
@@ -5962,10 +6168,10 @@ class TextTranslationTask extends StreamingAiTask {
|
|
|
5962
6168
|
var textTranslation = (input, config) => {
|
|
5963
6169
|
return new TextTranslationTask(config).run(input);
|
|
5964
6170
|
};
|
|
5965
|
-
|
|
6171
|
+
Workflow40.prototype.textTranslation = CreateWorkflow40(TextTranslationTask);
|
|
5966
6172
|
|
|
5967
6173
|
// src/task/ToolCallingTask.ts
|
|
5968
|
-
import { CreateWorkflow as
|
|
6174
|
+
import { CreateWorkflow as CreateWorkflow41, getTaskConstructors, Workflow as Workflow41 } from "@workglow/task-graph";
|
|
5969
6175
|
import { makeFingerprint } from "@workglow/util";
|
|
5970
6176
|
function taskTypesToTools(taskNames, registry) {
|
|
5971
6177
|
const constructors = getTaskConstructors(registry);
|
|
@@ -6049,11 +6255,11 @@ var ToolCallSchema = {
|
|
|
6049
6255
|
required: ["id", "name", "input"],
|
|
6050
6256
|
additionalProperties: false
|
|
6051
6257
|
};
|
|
6052
|
-
var
|
|
6258
|
+
var modelSchema31 = TypeModel("model:ToolCallingTask");
|
|
6053
6259
|
var ToolCallingInputSchema = {
|
|
6054
6260
|
type: "object",
|
|
6055
6261
|
properties: {
|
|
6056
|
-
model:
|
|
6262
|
+
model: modelSchema31,
|
|
6057
6263
|
prompt: {
|
|
6058
6264
|
oneOf: [
|
|
6059
6265
|
{ type: "string", title: "Prompt", description: "The prompt to send to the model" },
|
|
@@ -6150,7 +6356,8 @@ var ToolCallingOutputSchema = {
|
|
|
6150
6356
|
|
|
6151
6357
|
class ToolCallingTask extends StreamingAiTask {
|
|
6152
6358
|
static type = "ToolCallingTask";
|
|
6153
|
-
static
|
|
6359
|
+
static streamingPhaseLabel = "Generating";
|
|
6360
|
+
static category = "AI Text";
|
|
6154
6361
|
static title = "Tool Calling";
|
|
6155
6362
|
static description = "Sends a prompt with tool definitions to a language model and returns text along with any tool calls the model requests";
|
|
6156
6363
|
static inputSchema() {
|
|
@@ -6197,10 +6404,10 @@ class ToolCallingTask extends StreamingAiTask {
|
|
|
6197
6404
|
var toolCalling = (input, config) => {
|
|
6198
6405
|
return new ToolCallingTask(config).run(input);
|
|
6199
6406
|
};
|
|
6200
|
-
|
|
6407
|
+
Workflow41.prototype.toolCalling = CreateWorkflow41(ToolCallingTask);
|
|
6201
6408
|
|
|
6202
6409
|
// src/task/TopicSegmenterTask.ts
|
|
6203
|
-
import { CreateWorkflow as
|
|
6410
|
+
import { CreateWorkflow as CreateWorkflow42, Task as Task15, Workflow as Workflow42 } from "@workglow/task-graph";
|
|
6204
6411
|
var SegmentationMethod = {
|
|
6205
6412
|
HEURISTIC: "heuristic",
|
|
6206
6413
|
EMBEDDING_SIMILARITY: "embedding-similarity",
|
|
@@ -6480,15 +6687,15 @@ class TopicSegmenterTask extends Task15 {
|
|
|
6480
6687
|
var topicSegmenter = (input, config) => {
|
|
6481
6688
|
return new TopicSegmenterTask(config).run(input);
|
|
6482
6689
|
};
|
|
6483
|
-
|
|
6690
|
+
Workflow42.prototype.topicSegmenter = CreateWorkflow42(TopicSegmenterTask);
|
|
6484
6691
|
|
|
6485
6692
|
// src/task/UnloadModelTask.ts
|
|
6486
|
-
import { CreateWorkflow as
|
|
6487
|
-
var
|
|
6693
|
+
import { CreateWorkflow as CreateWorkflow43, Workflow as Workflow43 } from "@workglow/task-graph";
|
|
6694
|
+
var modelSchema32 = TypeModel("model");
|
|
6488
6695
|
var UnloadModelInputSchema = {
|
|
6489
6696
|
type: "object",
|
|
6490
6697
|
properties: {
|
|
6491
|
-
model:
|
|
6698
|
+
model: modelSchema32
|
|
6492
6699
|
},
|
|
6493
6700
|
required: ["model"],
|
|
6494
6701
|
additionalProperties: false
|
|
@@ -6496,7 +6703,7 @@ var UnloadModelInputSchema = {
|
|
|
6496
6703
|
var UnloadModelOutputSchema = {
|
|
6497
6704
|
type: "object",
|
|
6498
6705
|
properties: {
|
|
6499
|
-
model:
|
|
6706
|
+
model: modelSchema32
|
|
6500
6707
|
},
|
|
6501
6708
|
required: ["model"],
|
|
6502
6709
|
additionalProperties: false
|
|
@@ -6518,10 +6725,10 @@ class UnloadModelTask extends AiTask {
|
|
|
6518
6725
|
var unloadModel = (input, config) => {
|
|
6519
6726
|
return new UnloadModelTask(config).run(input);
|
|
6520
6727
|
};
|
|
6521
|
-
|
|
6728
|
+
Workflow43.prototype.unloadModel = CreateWorkflow43(UnloadModelTask);
|
|
6522
6729
|
|
|
6523
6730
|
// src/task/VectorQuantizeTask.ts
|
|
6524
|
-
import { CreateWorkflow as
|
|
6731
|
+
import { CreateWorkflow as CreateWorkflow44, Task as Task16, Workflow as Workflow44 } from "@workglow/task-graph";
|
|
6525
6732
|
import {
|
|
6526
6733
|
normalizeNumberArray,
|
|
6527
6734
|
TensorType,
|
|
@@ -6704,10 +6911,10 @@ class VectorQuantizeTask extends Task16 {
|
|
|
6704
6911
|
var vectorQuantize = (input, config) => {
|
|
6705
6912
|
return new VectorQuantizeTask(config).run(input);
|
|
6706
6913
|
};
|
|
6707
|
-
|
|
6914
|
+
Workflow44.prototype.vectorQuantize = CreateWorkflow44(VectorQuantizeTask);
|
|
6708
6915
|
|
|
6709
6916
|
// src/task/VectorSimilarityTask.ts
|
|
6710
|
-
import { CreateWorkflow as
|
|
6917
|
+
import { CreateWorkflow as CreateWorkflow45, GraphAsTask, Workflow as Workflow45 } from "@workglow/task-graph";
|
|
6711
6918
|
import {
|
|
6712
6919
|
cosineSimilarity,
|
|
6713
6920
|
hammingSimilarity,
|
|
@@ -6821,7 +7028,7 @@ class VectorSimilarityTask extends GraphAsTask {
|
|
|
6821
7028
|
var similarity = (input, config) => {
|
|
6822
7029
|
return new VectorSimilarityTask(config).run(input);
|
|
6823
7030
|
};
|
|
6824
|
-
|
|
7031
|
+
Workflow45.prototype.similarity = CreateWorkflow45(VectorSimilarityTask);
|
|
6825
7032
|
// src/task/MessageConversion.ts
|
|
6826
7033
|
function getInputMessages(input) {
|
|
6827
7034
|
const messages = input.messages;
|
|
@@ -6982,8 +7189,10 @@ var registerAiTasks = () => {
|
|
|
6982
7189
|
ChunkRetrievalTask,
|
|
6983
7190
|
ChunkVectorUpsertTask,
|
|
6984
7191
|
DownloadModelTask,
|
|
7192
|
+
ImageEditTask,
|
|
6985
7193
|
FaceDetectorTask,
|
|
6986
7194
|
FaceLandmarkerTask,
|
|
7195
|
+
ImageGenerateTask,
|
|
6987
7196
|
GestureRecognizerTask,
|
|
6988
7197
|
HandLandmarkerTask,
|
|
6989
7198
|
HierarchicalChunkerTask,
|
|
@@ -7061,7 +7270,9 @@ export {
|
|
|
7061
7270
|
isAllowedToolName,
|
|
7062
7271
|
imageToText,
|
|
7063
7272
|
imageSegmentation,
|
|
7273
|
+
imageGenerate,
|
|
7064
7274
|
imageEmbedding,
|
|
7275
|
+
imageEdit,
|
|
7065
7276
|
imageClassification,
|
|
7066
7277
|
hierarchyJoin,
|
|
7067
7278
|
hierarchicalChunker,
|
|
@@ -7077,6 +7288,7 @@ export {
|
|
|
7077
7288
|
documentEnricher,
|
|
7078
7289
|
countTokens,
|
|
7079
7290
|
contextBuilder,
|
|
7291
|
+
classifyProviderError,
|
|
7080
7292
|
chunkVectorUpsert,
|
|
7081
7293
|
chunkRetrieval,
|
|
7082
7294
|
buildToolDescription,
|
|
@@ -7085,10 +7297,12 @@ export {
|
|
|
7085
7297
|
VectorQuantizeTask,
|
|
7086
7298
|
UnloadModelTask,
|
|
7087
7299
|
TypeSingleOrArray,
|
|
7300
|
+
TypePoseLandmark,
|
|
7088
7301
|
TypeModelByDetail,
|
|
7089
7302
|
TypeModelAsString,
|
|
7090
7303
|
TypeModel,
|
|
7091
7304
|
TypeLanguage,
|
|
7305
|
+
TypeLandmark,
|
|
7092
7306
|
TypeImageInput,
|
|
7093
7307
|
TypeCategory,
|
|
7094
7308
|
TypeBoundingBox,
|
|
@@ -7142,6 +7356,7 @@ export {
|
|
|
7142
7356
|
QueuedAiProvider,
|
|
7143
7357
|
QueryExpansionMethod,
|
|
7144
7358
|
QueryExpanderTask,
|
|
7359
|
+
ProviderUnsupportedFeatureError,
|
|
7145
7360
|
PoseLandmarkerTask,
|
|
7146
7361
|
PoseLandmarkerOutputSchema,
|
|
7147
7362
|
PoseLandmarkerInputSchema,
|
|
@@ -7163,9 +7378,17 @@ export {
|
|
|
7163
7378
|
ImageSegmentationTask,
|
|
7164
7379
|
ImageSegmentationOutputSchema,
|
|
7165
7380
|
ImageSegmentationInputSchema,
|
|
7381
|
+
ImageGenerationProviderError,
|
|
7382
|
+
ImageGenerationContentPolicyError,
|
|
7383
|
+
ImageGenerateTask,
|
|
7384
|
+
ImageGenerateOutputSchema,
|
|
7385
|
+
ImageGenerateInputSchema,
|
|
7166
7386
|
ImageEmbeddingTask,
|
|
7167
7387
|
ImageEmbeddingOutputSchema,
|
|
7168
7388
|
ImageEmbeddingInputSchema,
|
|
7389
|
+
ImageEditTask,
|
|
7390
|
+
ImageEditOutputSchema,
|
|
7391
|
+
ImageEditInputSchema,
|
|
7169
7392
|
ImageClassificationTask,
|
|
7170
7393
|
ImageClassificationOutputSchema,
|
|
7171
7394
|
ImageClassificationInputSchema,
|
|
@@ -7205,9 +7428,10 @@ export {
|
|
|
7205
7428
|
AiProviderRegistry,
|
|
7206
7429
|
AiProvider,
|
|
7207
7430
|
AiJob,
|
|
7431
|
+
AiImageOutputTask,
|
|
7208
7432
|
AiChatTask,
|
|
7209
7433
|
AiChatOutputSchema,
|
|
7210
7434
|
AiChatInputSchema
|
|
7211
7435
|
};
|
|
7212
7436
|
|
|
7213
|
-
//# debugId=
|
|
7437
|
+
//# debugId=FE3CF1C31F27A99464756E2164756E21
|