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