@workglow/ai 0.0.78 → 0.0.80
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 +3 -3
- package/dist/browser.js +235 -183
- package/dist/browser.js.map +36 -36
- package/dist/bun.js +235 -183
- package/dist/bun.js.map +36 -36
- package/dist/job/AiJob.d.ts +2 -1
- package/dist/job/AiJob.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 +47 -2
- package/dist/model/ModelSchema.d.ts.map +1 -1
- package/dist/node.js +235 -183
- package/dist/node.js.map +36 -36
- package/dist/provider/AiProviderRegistry.d.ts +9 -9
- package/dist/provider/AiProviderRegistry.d.ts.map +1 -1
- package/dist/task/BackgroundRemovalTask.d.ts +4 -4
- package/dist/task/DocumentSplitterTask.d.ts +2 -2
- package/dist/task/DocumentSplitterTask.d.ts.map +1 -1
- package/dist/task/DownloadModelTask.d.ts +20 -20
- package/dist/task/FaceDetectorTask.d.ts +4 -4
- package/dist/task/FaceLandmarkerTask.d.ts +4 -4
- package/dist/task/GestureRecognizerTask.d.ts +4 -4
- package/dist/task/HandLandmarkerTask.d.ts +4 -4
- package/dist/task/ImageClassificationTask.d.ts +4 -4
- package/dist/task/ImageEmbeddingTask.d.ts +4 -4
- package/dist/task/ImageSegmentationTask.d.ts +4 -4
- package/dist/task/ImageToTextTask.d.ts +4 -4
- package/dist/task/ObjectDetectionTask.d.ts +4 -4
- package/dist/task/PoseLandmarkerTask.d.ts +4 -4
- package/dist/task/TextClassificationTask.d.ts +4 -4
- package/dist/task/TextEmbeddingTask.d.ts +4 -4
- package/dist/task/TextFillMaskTask.d.ts +4 -4
- package/dist/task/TextGenerationTask.d.ts +4 -4
- package/dist/task/TextLanguageDetectionTask.d.ts +4 -4
- package/dist/task/TextNamedEntityRecognitionTask.d.ts +4 -4
- package/dist/task/TextQuestionAnswerTask.d.ts +4 -4
- package/dist/task/TextRewriterTask.d.ts +4 -4
- package/dist/task/TextSummaryTask.d.ts +4 -4
- package/dist/task/TextTranslationTask.d.ts +4 -4
- package/dist/task/UnloadModelTask.d.ts +20 -20
- package/dist/task/UnloadModelTask.d.ts.map +1 -1
- package/dist/task/VectorSimilarityTask.d.ts +2 -2
- package/dist/task/VectorSimilarityTask.d.ts.map +1 -1
- package/dist/task/base/AiTask.d.ts +11 -3
- package/dist/task/base/AiTask.d.ts.map +1 -1
- package/dist/task/base/AiTaskSchemas.d.ts +2 -2
- package/dist/task/base/AiVisionTask.d.ts +3 -3
- package/dist/task/base/AiVisionTask.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/browser.js
CHANGED
|
@@ -6,9 +6,82 @@ import {
|
|
|
6
6
|
PermanentJobError
|
|
7
7
|
} from "@workglow/job-queue";
|
|
8
8
|
|
|
9
|
-
// src/
|
|
10
|
-
import {
|
|
9
|
+
// src/provider/AiProviderRegistry.ts
|
|
10
|
+
import { globalServiceRegistry, WORKER_MANAGER } from "@workglow/util";
|
|
11
|
+
|
|
12
|
+
class AiProviderRegistry {
|
|
13
|
+
runFnRegistry = new Map;
|
|
14
|
+
registerRunFn(modelProvider, taskType, runFn) {
|
|
15
|
+
if (!this.runFnRegistry.has(taskType)) {
|
|
16
|
+
this.runFnRegistry.set(taskType, new Map);
|
|
17
|
+
}
|
|
18
|
+
this.runFnRegistry.get(taskType).set(modelProvider, runFn);
|
|
19
|
+
}
|
|
20
|
+
registerAsWorkerRunFn(modelProvider, taskType) {
|
|
21
|
+
const workerFn = async (input, model, update_progress, signal) => {
|
|
22
|
+
const workerManager = globalServiceRegistry.get(WORKER_MANAGER);
|
|
23
|
+
const result = await workerManager.callWorkerFunction(modelProvider, taskType, [input, model], {
|
|
24
|
+
signal,
|
|
25
|
+
onProgress: update_progress
|
|
26
|
+
});
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
this.registerRunFn(modelProvider, taskType, workerFn);
|
|
30
|
+
}
|
|
31
|
+
getDirectRunFn(modelProvider, taskType) {
|
|
32
|
+
const taskTypeMap = this.runFnRegistry.get(taskType);
|
|
33
|
+
const runFn = taskTypeMap?.get(modelProvider);
|
|
34
|
+
if (!runFn) {
|
|
35
|
+
throw new Error(`No run function found for task type ${taskType} and model provider ${modelProvider}`);
|
|
36
|
+
}
|
|
37
|
+
return runFn;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
var providerRegistry;
|
|
41
|
+
function getAiProviderRegistry() {
|
|
42
|
+
if (!providerRegistry)
|
|
43
|
+
providerRegistry = new AiProviderRegistry;
|
|
44
|
+
return providerRegistry;
|
|
45
|
+
}
|
|
46
|
+
function setAiProviderRegistry(pr) {
|
|
47
|
+
providerRegistry = pr;
|
|
48
|
+
}
|
|
11
49
|
|
|
50
|
+
// src/job/AiJob.ts
|
|
51
|
+
class AiJob extends Job {
|
|
52
|
+
async execute(input, context) {
|
|
53
|
+
if (context.signal.aborted || this.status === JobStatus.ABORTING) {
|
|
54
|
+
throw new AbortSignalJobError("Abort signal aborted before execution of job");
|
|
55
|
+
}
|
|
56
|
+
let abortHandler;
|
|
57
|
+
try {
|
|
58
|
+
const abortPromise = new Promise((_resolve, reject) => {
|
|
59
|
+
const handler = () => {
|
|
60
|
+
reject(new AbortSignalJobError("Abort signal seen, ending job"));
|
|
61
|
+
};
|
|
62
|
+
context.signal.addEventListener("abort", handler, { once: true });
|
|
63
|
+
abortHandler = () => context.signal.removeEventListener("abort", handler);
|
|
64
|
+
});
|
|
65
|
+
const runFn = async () => {
|
|
66
|
+
const fn = getAiProviderRegistry().getDirectRunFn(input.aiProvider, input.taskType);
|
|
67
|
+
if (!fn) {
|
|
68
|
+
throw new PermanentJobError(`No run function found for task type ${input.taskType} and model provider ${input.aiProvider}`);
|
|
69
|
+
}
|
|
70
|
+
const model = input.taskInput.model;
|
|
71
|
+
if (context.signal?.aborted) {
|
|
72
|
+
throw new AbortSignalJobError("Job aborted");
|
|
73
|
+
}
|
|
74
|
+
return await fn(input.taskInput, model, context.updateProgress, context.signal);
|
|
75
|
+
};
|
|
76
|
+
const runFnPromise = runFn();
|
|
77
|
+
return await Promise.race([runFnPromise, abortPromise]);
|
|
78
|
+
} finally {
|
|
79
|
+
if (abortHandler) {
|
|
80
|
+
abortHandler();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
12
85
|
// src/model/InMemoryModelRepository.ts
|
|
13
86
|
import { InMemoryTabularRepository } from "@workglow/storage";
|
|
14
87
|
|
|
@@ -92,7 +165,7 @@ class ModelRepository {
|
|
|
92
165
|
}
|
|
93
166
|
|
|
94
167
|
// src/model/ModelSchema.ts
|
|
95
|
-
var
|
|
168
|
+
var ModelConfigSchema = {
|
|
96
169
|
type: "object",
|
|
97
170
|
properties: {
|
|
98
171
|
model_id: { type: "string" },
|
|
@@ -103,6 +176,15 @@ var ModelSchema = {
|
|
|
103
176
|
providerConfig: { type: "object", default: {} },
|
|
104
177
|
metadata: { type: "object", default: {} }
|
|
105
178
|
},
|
|
179
|
+
required: ["provider", "providerConfig"],
|
|
180
|
+
format: "model",
|
|
181
|
+
additionalProperties: false
|
|
182
|
+
};
|
|
183
|
+
var ModelRecordSchema = {
|
|
184
|
+
type: "object",
|
|
185
|
+
properties: {
|
|
186
|
+
...ModelConfigSchema.properties
|
|
187
|
+
},
|
|
106
188
|
required: ["model_id", "tasks", "provider", "title", "description", "providerConfig", "metadata"],
|
|
107
189
|
format: "model",
|
|
108
190
|
additionalProperties: false
|
|
@@ -112,101 +194,20 @@ var ModelPrimaryKeyNames = ["model_id"];
|
|
|
112
194
|
// src/model/InMemoryModelRepository.ts
|
|
113
195
|
class InMemoryModelRepository extends ModelRepository {
|
|
114
196
|
constructor() {
|
|
115
|
-
super(new InMemoryTabularRepository(
|
|
197
|
+
super(new InMemoryTabularRepository(ModelRecordSchema, ModelPrimaryKeyNames));
|
|
116
198
|
}
|
|
117
199
|
}
|
|
118
|
-
|
|
119
200
|
// src/model/ModelRegistry.ts
|
|
201
|
+
import { createServiceToken, globalServiceRegistry as globalServiceRegistry2 } from "@workglow/util";
|
|
120
202
|
var MODEL_REPOSITORY = createServiceToken("model.repository");
|
|
121
|
-
if (!
|
|
122
|
-
|
|
203
|
+
if (!globalServiceRegistry2.has(MODEL_REPOSITORY)) {
|
|
204
|
+
globalServiceRegistry2.register(MODEL_REPOSITORY, () => new InMemoryModelRepository, true);
|
|
123
205
|
}
|
|
124
206
|
function getGlobalModelRepository() {
|
|
125
|
-
return
|
|
207
|
+
return globalServiceRegistry2.get(MODEL_REPOSITORY);
|
|
126
208
|
}
|
|
127
209
|
function setGlobalModelRepository(pr) {
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// src/provider/AiProviderRegistry.ts
|
|
132
|
-
import { globalServiceRegistry as globalServiceRegistry2, WORKER_MANAGER } from "@workglow/util";
|
|
133
|
-
|
|
134
|
-
class AiProviderRegistry {
|
|
135
|
-
runFnRegistry = new Map;
|
|
136
|
-
registerRunFn(modelProvider, taskType, runFn) {
|
|
137
|
-
if (!this.runFnRegistry.has(taskType)) {
|
|
138
|
-
this.runFnRegistry.set(taskType, new Map);
|
|
139
|
-
}
|
|
140
|
-
this.runFnRegistry.get(taskType).set(modelProvider, runFn);
|
|
141
|
-
}
|
|
142
|
-
registerAsWorkerRunFn(modelProvider, taskType) {
|
|
143
|
-
const workerFn = async (input, model, update_progress, signal) => {
|
|
144
|
-
const workerManager = globalServiceRegistry2.get(WORKER_MANAGER);
|
|
145
|
-
const result = await workerManager.callWorkerFunction(modelProvider, taskType, [input, model], {
|
|
146
|
-
signal,
|
|
147
|
-
onProgress: update_progress
|
|
148
|
-
});
|
|
149
|
-
return result;
|
|
150
|
-
};
|
|
151
|
-
this.registerRunFn(modelProvider, taskType, workerFn);
|
|
152
|
-
}
|
|
153
|
-
getDirectRunFn(modelProvider, taskType) {
|
|
154
|
-
const taskTypeMap = this.runFnRegistry.get(taskType);
|
|
155
|
-
const runFn = taskTypeMap?.get(modelProvider);
|
|
156
|
-
if (!runFn) {
|
|
157
|
-
throw new Error(`No run function found for task type ${taskType} and model provider ${modelProvider}`);
|
|
158
|
-
}
|
|
159
|
-
return runFn;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
var providerRegistry;
|
|
163
|
-
function getAiProviderRegistry() {
|
|
164
|
-
if (!providerRegistry)
|
|
165
|
-
providerRegistry = new AiProviderRegistry;
|
|
166
|
-
return providerRegistry;
|
|
167
|
-
}
|
|
168
|
-
function setAiProviderRegistry(pr) {
|
|
169
|
-
providerRegistry = pr;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// src/job/AiJob.ts
|
|
173
|
-
class AiJob extends Job {
|
|
174
|
-
async execute(input, context) {
|
|
175
|
-
if (context.signal.aborted || this.status === JobStatus.ABORTING) {
|
|
176
|
-
throw new AbortSignalJobError("Abort signal aborted before execution of job");
|
|
177
|
-
}
|
|
178
|
-
let abortHandler;
|
|
179
|
-
try {
|
|
180
|
-
const abortPromise = new Promise((_resolve, reject) => {
|
|
181
|
-
const handler = () => {
|
|
182
|
-
reject(new AbortSignalJobError("Abort signal seen, ending job"));
|
|
183
|
-
};
|
|
184
|
-
context.signal.addEventListener("abort", handler, { once: true });
|
|
185
|
-
abortHandler = () => context.signal.removeEventListener("abort", handler);
|
|
186
|
-
});
|
|
187
|
-
const runFn = async () => {
|
|
188
|
-
const fn = getAiProviderRegistry().getDirectRunFn(input.aiProvider, input.taskType);
|
|
189
|
-
if (!fn) {
|
|
190
|
-
throw new PermanentJobError(`No run function found for task type ${input.taskType} and model provider ${input.aiProvider}`);
|
|
191
|
-
}
|
|
192
|
-
const modelName = input.taskInput.model;
|
|
193
|
-
const model = await getGlobalModelRepository().findByName(modelName);
|
|
194
|
-
if (modelName && !model) {
|
|
195
|
-
throw new PermanentJobError(`Model ${modelName} not found`);
|
|
196
|
-
}
|
|
197
|
-
if (context.signal?.aborted) {
|
|
198
|
-
throw new AbortSignalJobError("Job aborted");
|
|
199
|
-
}
|
|
200
|
-
return await fn(input.taskInput, model, context.updateProgress, context.signal);
|
|
201
|
-
};
|
|
202
|
-
const runFnPromise = runFn();
|
|
203
|
-
return await Promise.race([runFnPromise, abortPromise]);
|
|
204
|
-
} finally {
|
|
205
|
-
if (abortHandler) {
|
|
206
|
-
abortHandler();
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
+
globalServiceRegistry2.registerInstance(MODEL_REPOSITORY, pr);
|
|
210
211
|
}
|
|
211
212
|
// src/source/Document.ts
|
|
212
213
|
class Document {
|
|
@@ -556,7 +557,7 @@ function TypeModelByDetail(semantic = "model", options = {}) {
|
|
|
556
557
|
throw new Error("Invalid semantic value");
|
|
557
558
|
}
|
|
558
559
|
return {
|
|
559
|
-
...
|
|
560
|
+
...ModelConfigSchema,
|
|
560
561
|
...options,
|
|
561
562
|
format: semantic
|
|
562
563
|
};
|
|
@@ -705,22 +706,44 @@ class AiTask extends JobQueueTask {
|
|
|
705
706
|
static type = "AiTask";
|
|
706
707
|
modelCache;
|
|
707
708
|
constructor(input = {}, config = {}) {
|
|
708
|
-
|
|
709
|
+
const modelLabel = typeof input.model === "string" ? input.model : Array.isArray(input.model) ? undefined : typeof input.model === "object" && input.model ? input.model.model_id || input.model.title || input.model.provider : undefined;
|
|
710
|
+
config.name ||= `${new.target.type || new.target.name}${modelLabel ? " with model " + modelLabel : ""}`;
|
|
709
711
|
super(input, config);
|
|
710
712
|
}
|
|
711
713
|
async getJobInput(input) {
|
|
712
|
-
if (
|
|
713
|
-
console.error("AiTask: Model is
|
|
714
|
-
throw new TaskConfigurationError("AiTask: Model is
|
|
714
|
+
if (Array.isArray(input.model)) {
|
|
715
|
+
console.error("AiTask: Model is an array", input);
|
|
716
|
+
throw new TaskConfigurationError("AiTask: Model is an array, only create job for single model tasks");
|
|
715
717
|
}
|
|
716
718
|
const runtype = this.constructor.runtype ?? this.constructor.type;
|
|
717
|
-
const model = await this.
|
|
719
|
+
const model = await this.getModelConfigForInput(input);
|
|
718
720
|
return {
|
|
719
721
|
taskType: runtype,
|
|
720
722
|
aiProvider: model.provider,
|
|
721
|
-
taskInput: input
|
|
723
|
+
taskInput: { ...input, model }
|
|
722
724
|
};
|
|
723
725
|
}
|
|
726
|
+
async getModelConfigForInput(input) {
|
|
727
|
+
const modelValue = input.model;
|
|
728
|
+
if (!modelValue)
|
|
729
|
+
throw new TaskConfigurationError("AiTask: No model found");
|
|
730
|
+
if (typeof modelValue === "string") {
|
|
731
|
+
const modelname = modelValue;
|
|
732
|
+
if (this.modelCache && this.modelCache.name === modelname) {
|
|
733
|
+
return this.modelCache.model;
|
|
734
|
+
}
|
|
735
|
+
const model = await getGlobalModelRepository().findByName(modelname);
|
|
736
|
+
if (!model) {
|
|
737
|
+
throw new TaskConfigurationError(`AiTask: No model ${modelname} found`);
|
|
738
|
+
}
|
|
739
|
+
this.modelCache = { name: modelname, model };
|
|
740
|
+
return model;
|
|
741
|
+
}
|
|
742
|
+
if (typeof modelValue === "object") {
|
|
743
|
+
return modelValue;
|
|
744
|
+
}
|
|
745
|
+
throw new TaskConfigurationError("AiTask: Invalid model value");
|
|
746
|
+
}
|
|
724
747
|
async createJob(input, queueName) {
|
|
725
748
|
const jobInput = await this.getJobInput(input);
|
|
726
749
|
const resolvedQueueName = queueName ?? await this.getDefaultQueueName(input);
|
|
@@ -738,6 +761,9 @@ class AiTask extends JobQueueTask {
|
|
|
738
761
|
const modelname = input.model;
|
|
739
762
|
if (!modelname)
|
|
740
763
|
throw new TaskConfigurationError("AiTask: No model name found");
|
|
764
|
+
if (typeof modelname !== "string") {
|
|
765
|
+
throw new TaskConfigurationError("AiTask: Model name is not a string");
|
|
766
|
+
}
|
|
741
767
|
if (this.modelCache && this.modelCache.name === modelname) {
|
|
742
768
|
return this.modelCache.model;
|
|
743
769
|
}
|
|
@@ -753,6 +779,9 @@ class AiTask extends JobQueueTask {
|
|
|
753
779
|
const model = await this.getModelForInput(input);
|
|
754
780
|
return model.provider;
|
|
755
781
|
}
|
|
782
|
+
if (typeof input.model === "object" && input.model !== null && !Array.isArray(input.model)) {
|
|
783
|
+
return input.model.provider;
|
|
784
|
+
}
|
|
756
785
|
return;
|
|
757
786
|
}
|
|
758
787
|
async validateInput(input) {
|
|
@@ -769,9 +798,18 @@ class AiTask extends JobQueueTask {
|
|
|
769
798
|
for (const [key, propSchema] of modelTaskProperties) {
|
|
770
799
|
let requestedModels = Array.isArray(input[key]) ? input[key] : [input[key]];
|
|
771
800
|
for (const model of requestedModels) {
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
801
|
+
if (typeof model === "string") {
|
|
802
|
+
const foundModel = taskModels?.find((m) => m.model_id === model);
|
|
803
|
+
if (!foundModel) {
|
|
804
|
+
throw new TaskConfigurationError(`AiTask: Missing model for '${key}' named '${model}' for task '${this.type}'`);
|
|
805
|
+
}
|
|
806
|
+
} else if (typeof model === "object" && model !== null) {
|
|
807
|
+
const tasks = model.tasks;
|
|
808
|
+
if (Array.isArray(tasks) && tasks.length > 0 && !tasks.includes(this.type)) {
|
|
809
|
+
throw new TaskConfigurationError(`AiTask: Inline model for '${key}' is not compatible with task '${this.type}'`);
|
|
810
|
+
}
|
|
811
|
+
} else {
|
|
812
|
+
throw new TaskConfigurationError(`AiTask: Invalid model for '${key}'`);
|
|
775
813
|
}
|
|
776
814
|
}
|
|
777
815
|
}
|
|
@@ -781,9 +819,13 @@ class AiTask extends JobQueueTask {
|
|
|
781
819
|
for (const [key, propSchema] of modelPlainProperties) {
|
|
782
820
|
let requestedModels = Array.isArray(input[key]) ? input[key] : [input[key]];
|
|
783
821
|
for (const model of requestedModels) {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
822
|
+
if (typeof model === "string") {
|
|
823
|
+
const foundModel = await getGlobalModelRepository().findByName(model);
|
|
824
|
+
if (!foundModel) {
|
|
825
|
+
throw new TaskConfigurationError(`AiTask: Missing model for "${key}" named "${model}"`);
|
|
826
|
+
}
|
|
827
|
+
} else if (typeof model === "object" && model !== null) {} else {
|
|
828
|
+
throw new TaskConfigurationError(`AiTask: Invalid model for "${key}"`);
|
|
787
829
|
}
|
|
788
830
|
}
|
|
789
831
|
}
|
|
@@ -803,9 +845,18 @@ class AiTask extends JobQueueTask {
|
|
|
803
845
|
const taskModels = await getGlobalModelRepository().findModelsByTask(this.type);
|
|
804
846
|
for (const [key, propSchema] of modelTaskProperties) {
|
|
805
847
|
let requestedModels = Array.isArray(input[key]) ? input[key] : [input[key]];
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
848
|
+
const requestedStrings = requestedModels.filter((m) => typeof m === "string");
|
|
849
|
+
const requestedInline = requestedModels.filter((m) => typeof m === "object" && m !== null);
|
|
850
|
+
const usingStrings = requestedStrings.filter((model) => taskModels?.find((m) => m.model_id === model));
|
|
851
|
+
const usingInline = requestedInline.filter((model) => {
|
|
852
|
+
const tasks = model.tasks;
|
|
853
|
+
if (Array.isArray(tasks) && tasks.length > 0 && !tasks.includes(this.type)) {
|
|
854
|
+
return false;
|
|
855
|
+
}
|
|
856
|
+
return true;
|
|
857
|
+
});
|
|
858
|
+
const combined = [...usingInline, ...usingStrings];
|
|
859
|
+
input[key] = combined.length > 1 ? combined : combined[0];
|
|
809
860
|
}
|
|
810
861
|
}
|
|
811
862
|
return input;
|
|
@@ -877,10 +928,10 @@ class BackgroundRemovalTask extends AiVisionTask {
|
|
|
877
928
|
}
|
|
878
929
|
}
|
|
879
930
|
TaskRegistry.registerTask(BackgroundRemovalTask);
|
|
880
|
-
var
|
|
931
|
+
var backgroundRemoval = (input, config) => {
|
|
881
932
|
return new BackgroundRemovalTask(input, config).run();
|
|
882
933
|
};
|
|
883
|
-
Workflow.prototype.
|
|
934
|
+
Workflow.prototype.backgroundRemoval = CreateWorkflow(BackgroundRemovalTask);
|
|
884
935
|
// src/task/DocumentSplitterTask.ts
|
|
885
936
|
import {
|
|
886
937
|
CreateWorkflow as CreateWorkflow2,
|
|
@@ -942,10 +993,10 @@ class DocumentSplitterTask extends Task {
|
|
|
942
993
|
}
|
|
943
994
|
}
|
|
944
995
|
TaskRegistry2.registerTask(DocumentSplitterTask);
|
|
945
|
-
var
|
|
996
|
+
var documentSplitter = (input) => {
|
|
946
997
|
return new DocumentSplitterTask(input).run();
|
|
947
998
|
};
|
|
948
|
-
Workflow2.prototype.
|
|
999
|
+
Workflow2.prototype.documentSplitter = CreateWorkflow2(DocumentSplitterTask);
|
|
949
1000
|
// src/task/DownloadModelTask.ts
|
|
950
1001
|
import { CreateWorkflow as CreateWorkflow3, TaskRegistry as TaskRegistry3, Workflow as Workflow3 } from "@workglow/task-graph";
|
|
951
1002
|
var modelSchema2 = TypeReplicateArray(TypeModel("model"));
|
|
@@ -1001,10 +1052,10 @@ class DownloadModelTask extends AiTask {
|
|
|
1001
1052
|
}
|
|
1002
1053
|
}
|
|
1003
1054
|
TaskRegistry3.registerTask(DownloadModelTask);
|
|
1004
|
-
var
|
|
1055
|
+
var downloadModel = (input, config) => {
|
|
1005
1056
|
return new DownloadModelTask(input, config).run();
|
|
1006
1057
|
};
|
|
1007
|
-
Workflow3.prototype.
|
|
1058
|
+
Workflow3.prototype.downloadModel = CreateWorkflow3(DownloadModelTask);
|
|
1008
1059
|
// src/task/FaceDetectorTask.ts
|
|
1009
1060
|
import { CreateWorkflow as CreateWorkflow4, TaskRegistry as TaskRegistry4, Workflow as Workflow4 } from "@workglow/task-graph";
|
|
1010
1061
|
var modelSchema3 = TypeReplicateArray(TypeModel("model:FaceDetectorTask"));
|
|
@@ -1132,10 +1183,10 @@ class FaceDetectorTask extends AiVisionTask {
|
|
|
1132
1183
|
}
|
|
1133
1184
|
}
|
|
1134
1185
|
TaskRegistry4.registerTask(FaceDetectorTask);
|
|
1135
|
-
var
|
|
1186
|
+
var faceDetector = (input, config) => {
|
|
1136
1187
|
return new FaceDetectorTask(input, config).run();
|
|
1137
1188
|
};
|
|
1138
|
-
Workflow4.prototype.
|
|
1189
|
+
Workflow4.prototype.faceDetector = CreateWorkflow4(FaceDetectorTask);
|
|
1139
1190
|
// src/task/FaceLandmarkerTask.ts
|
|
1140
1191
|
import { CreateWorkflow as CreateWorkflow5, TaskRegistry as TaskRegistry5, Workflow as Workflow5 } from "@workglow/task-graph";
|
|
1141
1192
|
var modelSchema4 = TypeReplicateArray(TypeModel("model:FaceLandmarkerTask"));
|
|
@@ -1294,10 +1345,10 @@ class FaceLandmarkerTask extends AiVisionTask {
|
|
|
1294
1345
|
}
|
|
1295
1346
|
}
|
|
1296
1347
|
TaskRegistry5.registerTask(FaceLandmarkerTask);
|
|
1297
|
-
var
|
|
1348
|
+
var faceLandmarker = (input, config) => {
|
|
1298
1349
|
return new FaceLandmarkerTask(input, config).run();
|
|
1299
1350
|
};
|
|
1300
|
-
Workflow5.prototype.
|
|
1351
|
+
Workflow5.prototype.faceLandmarker = CreateWorkflow5(FaceLandmarkerTask);
|
|
1301
1352
|
// src/task/GestureRecognizerTask.ts
|
|
1302
1353
|
import { CreateWorkflow as CreateWorkflow6, TaskRegistry as TaskRegistry6, Workflow as Workflow6 } from "@workglow/task-graph";
|
|
1303
1354
|
var modelSchema5 = TypeReplicateArray(TypeModel("model:GestureRecognizerTask"));
|
|
@@ -1462,10 +1513,10 @@ class GestureRecognizerTask extends AiVisionTask {
|
|
|
1462
1513
|
}
|
|
1463
1514
|
}
|
|
1464
1515
|
TaskRegistry6.registerTask(GestureRecognizerTask);
|
|
1465
|
-
var
|
|
1516
|
+
var gestureRecognizer = (input, config) => {
|
|
1466
1517
|
return new GestureRecognizerTask(input, config).run();
|
|
1467
1518
|
};
|
|
1468
|
-
Workflow6.prototype.
|
|
1519
|
+
Workflow6.prototype.gestureRecognizer = CreateWorkflow6(GestureRecognizerTask);
|
|
1469
1520
|
// src/task/HandLandmarkerTask.ts
|
|
1470
1521
|
import { CreateWorkflow as CreateWorkflow7, TaskRegistry as TaskRegistry7, Workflow as Workflow7 } from "@workglow/task-graph";
|
|
1471
1522
|
var modelSchema6 = TypeReplicateArray(TypeModel("model:HandLandmarkerTask"));
|
|
@@ -1607,10 +1658,10 @@ class HandLandmarkerTask extends AiVisionTask {
|
|
|
1607
1658
|
}
|
|
1608
1659
|
}
|
|
1609
1660
|
TaskRegistry7.registerTask(HandLandmarkerTask);
|
|
1610
|
-
var
|
|
1661
|
+
var handLandmarker = (input, config) => {
|
|
1611
1662
|
return new HandLandmarkerTask(input, config).run();
|
|
1612
1663
|
};
|
|
1613
|
-
Workflow7.prototype.
|
|
1664
|
+
Workflow7.prototype.handLandmarker = CreateWorkflow7(HandLandmarkerTask);
|
|
1614
1665
|
// src/task/ImageClassificationTask.ts
|
|
1615
1666
|
import { CreateWorkflow as CreateWorkflow8, TaskRegistry as TaskRegistry8, Workflow as Workflow8 } from "@workglow/task-graph";
|
|
1616
1667
|
var modelSchema7 = TypeReplicateArray(TypeModel("model:ImageClassificationTask"));
|
|
@@ -1670,10 +1721,10 @@ class ImageClassificationTask extends AiVisionTask {
|
|
|
1670
1721
|
}
|
|
1671
1722
|
}
|
|
1672
1723
|
TaskRegistry8.registerTask(ImageClassificationTask);
|
|
1673
|
-
var
|
|
1724
|
+
var imageClassification = (input, config) => {
|
|
1674
1725
|
return new ImageClassificationTask(input, config).run();
|
|
1675
1726
|
};
|
|
1676
|
-
Workflow8.prototype.
|
|
1727
|
+
Workflow8.prototype.imageClassification = CreateWorkflow8(ImageClassificationTask);
|
|
1677
1728
|
// src/task/ImageEmbeddingTask.ts
|
|
1678
1729
|
import { CreateWorkflow as CreateWorkflow9, TaskRegistry as TaskRegistry9, Workflow as Workflow9 } from "@workglow/task-graph";
|
|
1679
1730
|
var modelSchema8 = TypeReplicateArray(TypeModel("model:ImageEmbeddingTask"));
|
|
@@ -1716,10 +1767,10 @@ class ImageEmbeddingTask extends AiVisionTask {
|
|
|
1716
1767
|
}
|
|
1717
1768
|
}
|
|
1718
1769
|
TaskRegistry9.registerTask(ImageEmbeddingTask);
|
|
1719
|
-
var
|
|
1770
|
+
var imageEmbedding = (input, config) => {
|
|
1720
1771
|
return new ImageEmbeddingTask(input, config).run();
|
|
1721
1772
|
};
|
|
1722
|
-
Workflow9.prototype.
|
|
1773
|
+
Workflow9.prototype.imageEmbedding = CreateWorkflow9(ImageEmbeddingTask);
|
|
1723
1774
|
// src/task/ImageSegmentationTask.ts
|
|
1724
1775
|
import { CreateWorkflow as CreateWorkflow10, TaskRegistry as TaskRegistry10, Workflow as Workflow10 } from "@workglow/task-graph";
|
|
1725
1776
|
var modelSchema9 = TypeReplicateArray(TypeModel("model:ImageSegmentationTask"));
|
|
@@ -1804,10 +1855,10 @@ class ImageSegmentationTask extends AiVisionTask {
|
|
|
1804
1855
|
}
|
|
1805
1856
|
}
|
|
1806
1857
|
TaskRegistry10.registerTask(ImageSegmentationTask);
|
|
1807
|
-
var
|
|
1858
|
+
var imageSegmentation = (input, config) => {
|
|
1808
1859
|
return new ImageSegmentationTask(input, config).run();
|
|
1809
1860
|
};
|
|
1810
|
-
Workflow10.prototype.
|
|
1861
|
+
Workflow10.prototype.imageSegmentation = CreateWorkflow10(ImageSegmentationTask);
|
|
1811
1862
|
// src/task/ImageToTextTask.ts
|
|
1812
1863
|
import { CreateWorkflow as CreateWorkflow11, TaskRegistry as TaskRegistry11, Workflow as Workflow11 } from "@workglow/task-graph";
|
|
1813
1864
|
var modelSchema10 = TypeReplicateArray(TypeModel("model:ImageToTextTask"));
|
|
@@ -1859,10 +1910,10 @@ class ImageToTextTask extends AiVisionTask {
|
|
|
1859
1910
|
}
|
|
1860
1911
|
}
|
|
1861
1912
|
TaskRegistry11.registerTask(ImageToTextTask);
|
|
1862
|
-
var
|
|
1913
|
+
var imageToText = (input, config) => {
|
|
1863
1914
|
return new ImageToTextTask(input, config).run();
|
|
1864
1915
|
};
|
|
1865
|
-
Workflow11.prototype.
|
|
1916
|
+
Workflow11.prototype.imageToText = CreateWorkflow11(ImageToTextTask);
|
|
1866
1917
|
// src/task/ObjectDetectionTask.ts
|
|
1867
1918
|
import { CreateWorkflow as CreateWorkflow12, TaskRegistry as TaskRegistry12, Workflow as Workflow12 } from "@workglow/task-graph";
|
|
1868
1919
|
var modelSchema11 = TypeReplicateArray(TypeModel("model:ObjectDetectionTask"));
|
|
@@ -1942,10 +1993,10 @@ class ObjectDetectionTask extends AiVisionTask {
|
|
|
1942
1993
|
}
|
|
1943
1994
|
}
|
|
1944
1995
|
TaskRegistry12.registerTask(ObjectDetectionTask);
|
|
1945
|
-
var
|
|
1996
|
+
var objectDetection = (input, config) => {
|
|
1946
1997
|
return new ObjectDetectionTask(input, config).run();
|
|
1947
1998
|
};
|
|
1948
|
-
Workflow12.prototype.
|
|
1999
|
+
Workflow12.prototype.objectDetection = CreateWorkflow12(ObjectDetectionTask);
|
|
1949
2000
|
// src/task/PoseLandmarkerTask.ts
|
|
1950
2001
|
import { CreateWorkflow as CreateWorkflow13, TaskRegistry as TaskRegistry13, Workflow as Workflow13 } from "@workglow/task-graph";
|
|
1951
2002
|
var modelSchema12 = TypeReplicateArray(TypeModel("model:PoseLandmarkerTask"));
|
|
@@ -2104,10 +2155,10 @@ class PoseLandmarkerTask extends AiVisionTask {
|
|
|
2104
2155
|
}
|
|
2105
2156
|
}
|
|
2106
2157
|
TaskRegistry13.registerTask(PoseLandmarkerTask);
|
|
2107
|
-
var
|
|
2158
|
+
var poseLandmarker = (input, config) => {
|
|
2108
2159
|
return new PoseLandmarkerTask(input, config).run();
|
|
2109
2160
|
};
|
|
2110
|
-
Workflow13.prototype.
|
|
2161
|
+
Workflow13.prototype.poseLandmarker = CreateWorkflow13(PoseLandmarkerTask);
|
|
2111
2162
|
// src/task/TextClassificationTask.ts
|
|
2112
2163
|
import { CreateWorkflow as CreateWorkflow14, TaskRegistry as TaskRegistry14, Workflow as Workflow14 } from "@workglow/task-graph";
|
|
2113
2164
|
var modelSchema13 = TypeReplicateArray(TypeModel("model:TextClassificationTask"));
|
|
@@ -2185,10 +2236,10 @@ class TextClassificationTask extends AiTask {
|
|
|
2185
2236
|
}
|
|
2186
2237
|
}
|
|
2187
2238
|
TaskRegistry14.registerTask(TextClassificationTask);
|
|
2188
|
-
var
|
|
2239
|
+
var textClassification = (input, config) => {
|
|
2189
2240
|
return new TextClassificationTask(input, config).run();
|
|
2190
2241
|
};
|
|
2191
|
-
Workflow14.prototype.
|
|
2242
|
+
Workflow14.prototype.textClassification = CreateWorkflow14(TextClassificationTask);
|
|
2192
2243
|
// src/task/TextEmbeddingTask.ts
|
|
2193
2244
|
import { CreateWorkflow as CreateWorkflow15, TaskRegistry as TaskRegistry15, Workflow as Workflow15 } from "@workglow/task-graph";
|
|
2194
2245
|
var modelSchema14 = TypeReplicateArray(TypeModel("model:TextEmbeddingTask"));
|
|
@@ -2230,10 +2281,10 @@ class TextEmbeddingTask extends AiTask {
|
|
|
2230
2281
|
}
|
|
2231
2282
|
}
|
|
2232
2283
|
TaskRegistry15.registerTask(TextEmbeddingTask);
|
|
2233
|
-
var
|
|
2284
|
+
var textEmbedding = async (input, config) => {
|
|
2234
2285
|
return new TextEmbeddingTask(input, config).run();
|
|
2235
2286
|
};
|
|
2236
|
-
Workflow15.prototype.
|
|
2287
|
+
Workflow15.prototype.textEmbedding = CreateWorkflow15(TextEmbeddingTask);
|
|
2237
2288
|
// src/task/TextFillMaskTask.ts
|
|
2238
2289
|
import { CreateWorkflow as CreateWorkflow16, TaskRegistry as TaskRegistry16, Workflow as Workflow16 } from "@workglow/task-graph";
|
|
2239
2290
|
var modelSchema15 = TypeReplicateArray(TypeModel("model:TextFillMaskTask"));
|
|
@@ -2298,10 +2349,10 @@ class TextFillMaskTask extends AiTask {
|
|
|
2298
2349
|
}
|
|
2299
2350
|
}
|
|
2300
2351
|
TaskRegistry16.registerTask(TextFillMaskTask);
|
|
2301
|
-
var
|
|
2352
|
+
var textFillMask = (input, config) => {
|
|
2302
2353
|
return new TextFillMaskTask(input, config).run();
|
|
2303
2354
|
};
|
|
2304
|
-
Workflow16.prototype.
|
|
2355
|
+
Workflow16.prototype.textFillMask = CreateWorkflow16(TextFillMaskTask);
|
|
2305
2356
|
// src/task/TextGenerationTask.ts
|
|
2306
2357
|
import { CreateWorkflow as CreateWorkflow17, TaskRegistry as TaskRegistry17, Workflow as Workflow17 } from "@workglow/task-graph";
|
|
2307
2358
|
var generatedTextSchema2 = {
|
|
@@ -2389,10 +2440,10 @@ class TextGenerationTask extends AiTask {
|
|
|
2389
2440
|
}
|
|
2390
2441
|
}
|
|
2391
2442
|
TaskRegistry17.registerTask(TextGenerationTask);
|
|
2392
|
-
var
|
|
2443
|
+
var textGeneration = (input, config) => {
|
|
2393
2444
|
return new TextGenerationTask(input, config).run();
|
|
2394
2445
|
};
|
|
2395
|
-
Workflow17.prototype.
|
|
2446
|
+
Workflow17.prototype.textGeneration = CreateWorkflow17(TextGenerationTask);
|
|
2396
2447
|
// src/task/TextLanguageDetectionTask.ts
|
|
2397
2448
|
import { CreateWorkflow as CreateWorkflow18, TaskRegistry as TaskRegistry18, Workflow as Workflow18 } from "@workglow/task-graph";
|
|
2398
2449
|
var modelSchema17 = TypeReplicateArray(TypeModel("model:TextLanguageDetectionTask"));
|
|
@@ -2460,10 +2511,10 @@ class TextLanguageDetectionTask extends AiTask {
|
|
|
2460
2511
|
}
|
|
2461
2512
|
}
|
|
2462
2513
|
TaskRegistry18.registerTask(TextLanguageDetectionTask);
|
|
2463
|
-
var
|
|
2514
|
+
var textLanguageDetection = (input, config) => {
|
|
2464
2515
|
return new TextLanguageDetectionTask(input, config).run();
|
|
2465
2516
|
};
|
|
2466
|
-
Workflow18.prototype.
|
|
2517
|
+
Workflow18.prototype.textLanguageDetection = CreateWorkflow18(TextLanguageDetectionTask);
|
|
2467
2518
|
// src/task/TextNamedEntityRecognitionTask.ts
|
|
2468
2519
|
import { CreateWorkflow as CreateWorkflow19, TaskRegistry as TaskRegistry19, Workflow as Workflow19 } from "@workglow/task-graph";
|
|
2469
2520
|
var modelSchema18 = TypeReplicateArray(TypeModel("model:NamedEntityRecognitionTask"));
|
|
@@ -2538,10 +2589,10 @@ class TextNamedEntityRecognitionTask extends AiTask {
|
|
|
2538
2589
|
}
|
|
2539
2590
|
}
|
|
2540
2591
|
TaskRegistry19.registerTask(TextNamedEntityRecognitionTask);
|
|
2541
|
-
var
|
|
2592
|
+
var textNamedEntityRecognition = (input, config) => {
|
|
2542
2593
|
return new TextNamedEntityRecognitionTask(input, config).run();
|
|
2543
2594
|
};
|
|
2544
|
-
Workflow19.prototype.
|
|
2595
|
+
Workflow19.prototype.textNamedEntityRecognition = CreateWorkflow19(TextNamedEntityRecognitionTask);
|
|
2545
2596
|
// src/task/TextQuestionAnswerTask.ts
|
|
2546
2597
|
import { CreateWorkflow as CreateWorkflow20, TaskRegistry as TaskRegistry20, Workflow as Workflow20 } from "@workglow/task-graph";
|
|
2547
2598
|
var contextSchema = {
|
|
@@ -2596,10 +2647,10 @@ class TextQuestionAnswerTask extends AiTask {
|
|
|
2596
2647
|
}
|
|
2597
2648
|
}
|
|
2598
2649
|
TaskRegistry20.registerTask(TextQuestionAnswerTask);
|
|
2599
|
-
var
|
|
2650
|
+
var textQuestionAnswer = (input, config) => {
|
|
2600
2651
|
return new TextQuestionAnswerTask(input, config).run();
|
|
2601
2652
|
};
|
|
2602
|
-
Workflow20.prototype.
|
|
2653
|
+
Workflow20.prototype.textQuestionAnswer = CreateWorkflow20(TextQuestionAnswerTask);
|
|
2603
2654
|
// src/task/TextRewriterTask.ts
|
|
2604
2655
|
import { CreateWorkflow as CreateWorkflow21, TaskRegistry as TaskRegistry21, Workflow as Workflow21 } from "@workglow/task-graph";
|
|
2605
2656
|
var modelSchema20 = TypeReplicateArray(TypeModel("model:TextRewriterTask"));
|
|
@@ -2647,10 +2698,10 @@ class TextRewriterTask extends AiTask {
|
|
|
2647
2698
|
}
|
|
2648
2699
|
}
|
|
2649
2700
|
TaskRegistry21.registerTask(TextRewriterTask);
|
|
2650
|
-
var
|
|
2701
|
+
var textRewriter = (input, config) => {
|
|
2651
2702
|
return new TextRewriterTask(input, config).run();
|
|
2652
2703
|
};
|
|
2653
|
-
Workflow21.prototype.
|
|
2704
|
+
Workflow21.prototype.textRewriter = CreateWorkflow21(TextRewriterTask);
|
|
2654
2705
|
// src/task/TextSummaryTask.ts
|
|
2655
2706
|
import { CreateWorkflow as CreateWorkflow22, TaskRegistry as TaskRegistry22, Workflow as Workflow22 } from "@workglow/task-graph";
|
|
2656
2707
|
var modelSchema21 = TypeReplicateArray(TypeModel("model:TextSummaryTask"));
|
|
@@ -2693,10 +2744,10 @@ class TextSummaryTask extends AiTask {
|
|
|
2693
2744
|
}
|
|
2694
2745
|
}
|
|
2695
2746
|
TaskRegistry22.registerTask(TextSummaryTask);
|
|
2696
|
-
var
|
|
2747
|
+
var textSummary = async (input, config) => {
|
|
2697
2748
|
return new TextSummaryTask(input, config).run();
|
|
2698
2749
|
};
|
|
2699
|
-
Workflow22.prototype.
|
|
2750
|
+
Workflow22.prototype.textSummary = CreateWorkflow22(TextSummaryTask);
|
|
2700
2751
|
// src/task/TextTranslationTask.ts
|
|
2701
2752
|
import { CreateWorkflow as CreateWorkflow23, TaskRegistry as TaskRegistry23, Workflow as Workflow23 } from "@workglow/task-graph";
|
|
2702
2753
|
var modelSchema22 = TypeReplicateArray(TypeModel("model:TextTranslationTask"));
|
|
@@ -2762,10 +2813,10 @@ class TextTranslationTask extends AiTask {
|
|
|
2762
2813
|
}
|
|
2763
2814
|
}
|
|
2764
2815
|
TaskRegistry23.registerTask(TextTranslationTask);
|
|
2765
|
-
var
|
|
2816
|
+
var textTranslation = (input, config) => {
|
|
2766
2817
|
return new TextTranslationTask(input, config).run();
|
|
2767
2818
|
};
|
|
2768
|
-
Workflow23.prototype.
|
|
2819
|
+
Workflow23.prototype.textTranslation = CreateWorkflow23(TextTranslationTask);
|
|
2769
2820
|
// src/task/UnloadModelTask.ts
|
|
2770
2821
|
import { CreateWorkflow as CreateWorkflow24, TaskRegistry as TaskRegistry24, Workflow as Workflow24 } from "@workglow/task-graph";
|
|
2771
2822
|
var modelSchema23 = TypeReplicateArray(TypeModel("model"));
|
|
@@ -2800,10 +2851,10 @@ class UnloadModelTask extends AiTask {
|
|
|
2800
2851
|
static cacheable = false;
|
|
2801
2852
|
}
|
|
2802
2853
|
TaskRegistry24.registerTask(UnloadModelTask);
|
|
2803
|
-
var
|
|
2854
|
+
var unloadModel = (input, config) => {
|
|
2804
2855
|
return new UnloadModelTask(input, config).run();
|
|
2805
2856
|
};
|
|
2806
|
-
Workflow24.prototype.
|
|
2857
|
+
Workflow24.prototype.unloadModel = CreateWorkflow24(UnloadModelTask);
|
|
2807
2858
|
// src/task/VectorSimilarityTask.ts
|
|
2808
2859
|
import {
|
|
2809
2860
|
ArrayTask,
|
|
@@ -2905,10 +2956,10 @@ class VectorSimilarityTask extends ArrayTask {
|
|
|
2905
2956
|
}
|
|
2906
2957
|
}
|
|
2907
2958
|
TaskRegistry25.registerTask(VectorSimilarityTask);
|
|
2908
|
-
var
|
|
2959
|
+
var similarity = (input, config) => {
|
|
2909
2960
|
return new VectorSimilarityTask(input, config).run();
|
|
2910
2961
|
};
|
|
2911
|
-
Workflow25.prototype.
|
|
2962
|
+
Workflow25.prototype.similarity = CreateWorkflow25(VectorSimilarityTask);
|
|
2912
2963
|
function inner(arr1, arr2) {
|
|
2913
2964
|
return 1 - arr1.reduce((acc, val, i) => acc + val * arr2[i], 0);
|
|
2914
2965
|
}
|
|
@@ -2936,16 +2987,40 @@ function normalize(vector) {
|
|
|
2936
2987
|
return new Float32Array(normalized);
|
|
2937
2988
|
}
|
|
2938
2989
|
export {
|
|
2990
|
+
unloadModel,
|
|
2991
|
+
textTranslation,
|
|
2992
|
+
textSummary,
|
|
2993
|
+
textRewriter,
|
|
2994
|
+
textQuestionAnswer,
|
|
2995
|
+
textNamedEntityRecognition,
|
|
2996
|
+
textLanguageDetection,
|
|
2997
|
+
textGeneration,
|
|
2998
|
+
textFillMask,
|
|
2999
|
+
textEmbedding,
|
|
3000
|
+
textClassification,
|
|
3001
|
+
similarity,
|
|
2939
3002
|
setGlobalModelRepository,
|
|
2940
3003
|
setAiProviderRegistry,
|
|
3004
|
+
poseLandmarker,
|
|
3005
|
+
objectDetection,
|
|
2941
3006
|
normalize,
|
|
2942
3007
|
magnitude,
|
|
2943
3008
|
inner,
|
|
3009
|
+
imageToText,
|
|
3010
|
+
imageSegmentation,
|
|
3011
|
+
imageEmbedding,
|
|
3012
|
+
imageClassification,
|
|
3013
|
+
handLandmarker,
|
|
2944
3014
|
getGlobalModelRepository,
|
|
2945
3015
|
getAiProviderRegistry,
|
|
3016
|
+
gestureRecognizer,
|
|
3017
|
+
faceLandmarker,
|
|
3018
|
+
faceDetector,
|
|
3019
|
+
downloadModel,
|
|
3020
|
+
documentSplitter,
|
|
3021
|
+
backgroundRemoval,
|
|
2946
3022
|
VectorSimilarityTask,
|
|
2947
3023
|
UnloadModelTask,
|
|
2948
|
-
UnloadModel,
|
|
2949
3024
|
TypedArraySchema,
|
|
2950
3025
|
TypeReplicateArray,
|
|
2951
3026
|
TypeModelByDetail,
|
|
@@ -2959,97 +3034,75 @@ export {
|
|
|
2959
3034
|
TextTranslationTask,
|
|
2960
3035
|
TextTranslationOutputSchema,
|
|
2961
3036
|
TextTranslationInputSchema,
|
|
2962
|
-
TextTranslation,
|
|
2963
3037
|
TextSummaryTask,
|
|
2964
3038
|
TextSummaryOutputSchema,
|
|
2965
3039
|
TextSummaryInputSchema,
|
|
2966
|
-
TextSummary,
|
|
2967
3040
|
TextRewriterTask,
|
|
2968
3041
|
TextRewriterOutputSchema,
|
|
2969
3042
|
TextRewriterInputSchema,
|
|
2970
|
-
TextRewriter,
|
|
2971
3043
|
TextQuestionAnswerTask,
|
|
2972
3044
|
TextQuestionAnswerOutputSchema,
|
|
2973
3045
|
TextQuestionAnswerInputSchema,
|
|
2974
|
-
TextQuestionAnswer,
|
|
2975
3046
|
TextNamedEntityRecognitionTask,
|
|
2976
3047
|
TextNamedEntityRecognitionOutputSchema,
|
|
2977
3048
|
TextNamedEntityRecognitionInputSchema,
|
|
2978
|
-
TextNamedEntityRecognition,
|
|
2979
3049
|
TextLanguageDetectionTask,
|
|
2980
3050
|
TextLanguageDetectionOutputSchema,
|
|
2981
3051
|
TextLanguageDetectionInputSchema,
|
|
2982
|
-
TextLanguageDetection,
|
|
2983
3052
|
TextGenerationTask,
|
|
2984
3053
|
TextGenerationOutputSchema,
|
|
2985
3054
|
TextGenerationInputSchema,
|
|
2986
|
-
TextGeneration,
|
|
2987
3055
|
TextFragment,
|
|
2988
3056
|
TextFillMaskTask,
|
|
2989
3057
|
TextFillMaskOutputSchema,
|
|
2990
3058
|
TextFillMaskInputSchema,
|
|
2991
|
-
TextFillMask,
|
|
2992
3059
|
TextEmbeddingTask,
|
|
2993
3060
|
TextEmbeddingOutputSchema,
|
|
2994
3061
|
TextEmbeddingInputSchema,
|
|
2995
|
-
TextEmbedding,
|
|
2996
3062
|
TextClassificationTask,
|
|
2997
3063
|
TextClassificationOutputSchema,
|
|
2998
3064
|
TextClassificationInputSchema,
|
|
2999
|
-
TextClassification,
|
|
3000
3065
|
TableFragment,
|
|
3001
3066
|
SimilarityFn,
|
|
3002
|
-
Similarity,
|
|
3003
3067
|
PoseLandmarkerTask,
|
|
3004
3068
|
PoseLandmarkerOutputSchema,
|
|
3005
3069
|
PoseLandmarkerInputSchema,
|
|
3006
|
-
PoseLandmarker,
|
|
3007
3070
|
ObjectDetectionTask,
|
|
3008
3071
|
ObjectDetectionOutputSchema,
|
|
3009
3072
|
ObjectDetectionInputSchema,
|
|
3010
|
-
ObjectDetection,
|
|
3011
|
-
ModelSchema,
|
|
3012
3073
|
ModelRepository,
|
|
3074
|
+
ModelRecordSchema,
|
|
3013
3075
|
ModelPrimaryKeyNames,
|
|
3076
|
+
ModelConfigSchema,
|
|
3014
3077
|
MODEL_REPOSITORY,
|
|
3015
3078
|
InMemoryModelRepository,
|
|
3016
3079
|
ImageToTextTask,
|
|
3017
3080
|
ImageToTextOutputSchema,
|
|
3018
3081
|
ImageToTextInputSchema,
|
|
3019
|
-
ImageToText,
|
|
3020
3082
|
ImageSegmentationTask,
|
|
3021
3083
|
ImageSegmentationOutputSchema,
|
|
3022
3084
|
ImageSegmentationInputSchema,
|
|
3023
|
-
ImageSegmentation,
|
|
3024
3085
|
ImageFragment,
|
|
3025
3086
|
ImageEmbeddingTask,
|
|
3026
3087
|
ImageEmbeddingOutputSchema,
|
|
3027
3088
|
ImageEmbeddingInputSchema,
|
|
3028
|
-
ImageEmbedding,
|
|
3029
3089
|
ImageClassificationTask,
|
|
3030
3090
|
ImageClassificationOutputSchema,
|
|
3031
3091
|
ImageClassificationInputSchema,
|
|
3032
|
-
ImageClassification,
|
|
3033
3092
|
HandLandmarkerTask,
|
|
3034
3093
|
HandLandmarkerOutputSchema,
|
|
3035
3094
|
HandLandmarkerInputSchema,
|
|
3036
|
-
HandLandmarker,
|
|
3037
3095
|
GestureRecognizerTask,
|
|
3038
3096
|
GestureRecognizerOutputSchema,
|
|
3039
3097
|
GestureRecognizerInputSchema,
|
|
3040
|
-
GestureRecognizer,
|
|
3041
3098
|
FaceLandmarkerTask,
|
|
3042
3099
|
FaceLandmarkerOutputSchema,
|
|
3043
3100
|
FaceLandmarkerInputSchema,
|
|
3044
|
-
FaceLandmarker,
|
|
3045
3101
|
FaceDetectorTask,
|
|
3046
3102
|
FaceDetectorOutputSchema,
|
|
3047
3103
|
FaceDetectorInputSchema,
|
|
3048
|
-
FaceDetector,
|
|
3049
3104
|
DownloadModelTask,
|
|
3050
|
-
DownloadModel,
|
|
3051
3105
|
DocumentSplitterTask,
|
|
3052
|
-
DocumentSplitter,
|
|
3053
3106
|
DocumentSection,
|
|
3054
3107
|
DocumentConverterText,
|
|
3055
3108
|
DocumentConverterMarkdown,
|
|
@@ -3058,10 +3111,9 @@ export {
|
|
|
3058
3111
|
BackgroundRemovalTask,
|
|
3059
3112
|
BackgroundRemovalOutputSchema,
|
|
3060
3113
|
BackgroundRemovalInputSchema,
|
|
3061
|
-
BackgroundRemoval,
|
|
3062
3114
|
AiTask,
|
|
3063
3115
|
AiProviderRegistry,
|
|
3064
3116
|
AiJob
|
|
3065
3117
|
};
|
|
3066
3118
|
|
|
3067
|
-
//# debugId=
|
|
3119
|
+
//# debugId=D6C06481172017C264756E2164756E21
|