@workglow/ai 0.0.69 → 0.0.71
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/dist/browser.js +204 -62
- package/dist/browser.js.map +13 -11
- package/dist/bun.js +204 -62
- package/dist/bun.js.map +13 -11
- package/dist/node.js +204 -62
- package/dist/node.js.map +13 -11
- package/dist/task/TextClassifierTask.d.ts +7 -7
- package/dist/task/TextClassifierTask.d.ts.map +1 -1
- package/dist/task/TextEmbeddingTask.d.ts +3 -1
- package/dist/task/TextEmbeddingTask.d.ts.map +1 -1
- package/dist/task/TextFillMaskTask.d.ts +202 -0
- package/dist/task/TextFillMaskTask.d.ts.map +1 -0
- package/dist/task/TextGenerationTask.d.ts +3 -0
- package/dist/task/TextGenerationTask.d.ts.map +1 -1
- package/dist/task/TextLanguageDetectionTask.d.ts +7 -7
- package/dist/task/TextLanguageDetectionTask.d.ts.map +1 -1
- package/dist/task/TextNamedEntityRecognitionTask.d.ts +212 -0
- package/dist/task/TextNamedEntityRecognitionTask.d.ts.map +1 -0
- package/dist/task/TextQuestionAnswerTask.d.ts +3 -0
- package/dist/task/TextQuestionAnswerTask.d.ts.map +1 -1
- package/dist/task/TextRewriterTask.d.ts +3 -0
- package/dist/task/TextRewriterTask.d.ts.map +1 -1
- package/dist/task/TextSummaryTask.d.ts +3 -0
- package/dist/task/TextSummaryTask.d.ts.map +1 -1
- package/dist/task/TextTranslationTask.d.ts +3 -0
- package/dist/task/TextTranslationTask.d.ts.map +1 -1
- package/dist/task/base/AiTaskSchemas.d.ts +1 -1
- package/dist/task/index.d.ts +2 -0
- package/dist/task/index.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/bun.js
CHANGED
|
@@ -829,16 +829,10 @@ var TextClassifierInputSchema = {
|
|
|
829
829
|
description: "The text to classify"
|
|
830
830
|
}),
|
|
831
831
|
maxCategories: {
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
maximum: 1000
|
|
837
|
-
},
|
|
838
|
-
{
|
|
839
|
-
type: "null"
|
|
840
|
-
}
|
|
841
|
-
],
|
|
832
|
+
type: "number",
|
|
833
|
+
minimum: 1,
|
|
834
|
+
maximum: 1000,
|
|
835
|
+
default: 5,
|
|
842
836
|
title: "Max Categories",
|
|
843
837
|
description: "The maximum number of categories to return"
|
|
844
838
|
},
|
|
@@ -939,18 +933,86 @@ var TextEmbedding = async (input, config) => {
|
|
|
939
933
|
return new TextEmbeddingTask(input, config).run();
|
|
940
934
|
};
|
|
941
935
|
Workflow4.prototype.TextEmbedding = CreateWorkflow4(TextEmbeddingTask);
|
|
942
|
-
// src/task/
|
|
936
|
+
// src/task/TextFillMaskTask.ts
|
|
943
937
|
import { CreateWorkflow as CreateWorkflow5, TaskRegistry as TaskRegistry5, Workflow as Workflow5 } from "@workglow/task-graph";
|
|
938
|
+
var modelSchema4 = TypeReplicateArray(TypeModel("model:TextFillMaskTask"));
|
|
939
|
+
var TextFillMaskInputSchema = {
|
|
940
|
+
type: "object",
|
|
941
|
+
properties: {
|
|
942
|
+
text: TypeReplicateArray({
|
|
943
|
+
type: "string",
|
|
944
|
+
title: "Text",
|
|
945
|
+
description: "The text with a mask token to fill"
|
|
946
|
+
}),
|
|
947
|
+
model: modelSchema4
|
|
948
|
+
},
|
|
949
|
+
required: ["text", "model"],
|
|
950
|
+
additionalProperties: false
|
|
951
|
+
};
|
|
952
|
+
var TextFillMaskOutputSchema = {
|
|
953
|
+
type: "object",
|
|
954
|
+
properties: {
|
|
955
|
+
predictions: {
|
|
956
|
+
type: "array",
|
|
957
|
+
items: {
|
|
958
|
+
type: "object",
|
|
959
|
+
properties: {
|
|
960
|
+
entity: {
|
|
961
|
+
type: "string",
|
|
962
|
+
title: "Entity",
|
|
963
|
+
description: "The token that was predicted to fill the mask"
|
|
964
|
+
},
|
|
965
|
+
score: {
|
|
966
|
+
type: "number",
|
|
967
|
+
title: "Score",
|
|
968
|
+
description: "The confidence score for this prediction"
|
|
969
|
+
},
|
|
970
|
+
sequence: {
|
|
971
|
+
type: "string",
|
|
972
|
+
title: "Sequence",
|
|
973
|
+
description: "The complete text with the mask filled"
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
required: ["entity", "score", "sequence"],
|
|
977
|
+
additionalProperties: false
|
|
978
|
+
},
|
|
979
|
+
title: "Predictions",
|
|
980
|
+
description: "The predicted tokens to fill the mask with their scores and complete sequences"
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
required: ["predictions"],
|
|
984
|
+
additionalProperties: false
|
|
985
|
+
};
|
|
986
|
+
|
|
987
|
+
class TextFillMaskTask extends AiTask {
|
|
988
|
+
static type = "TextFillMaskTask";
|
|
989
|
+
static category = "AI Text Model";
|
|
990
|
+
static title = "Text Fill Mask";
|
|
991
|
+
static description = "Fills masked tokens in text using language models";
|
|
992
|
+
static inputSchema() {
|
|
993
|
+
return TextFillMaskInputSchema;
|
|
994
|
+
}
|
|
995
|
+
static outputSchema() {
|
|
996
|
+
return TextFillMaskOutputSchema;
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
TaskRegistry5.registerTask(TextFillMaskTask);
|
|
1000
|
+
var TextFillMask = (input, config) => {
|
|
1001
|
+
return new TextFillMaskTask(input, config).run();
|
|
1002
|
+
};
|
|
1003
|
+
Workflow5.prototype.TextFillMask = CreateWorkflow5(TextFillMaskTask);
|
|
1004
|
+
// src/task/TextGenerationTask.ts
|
|
1005
|
+
import { CreateWorkflow as CreateWorkflow6, TaskRegistry as TaskRegistry6, Workflow as Workflow6 } from "@workglow/task-graph";
|
|
944
1006
|
var generatedTextSchema = {
|
|
945
1007
|
type: "string",
|
|
946
1008
|
title: "Text",
|
|
947
1009
|
description: "The generated text"
|
|
948
1010
|
};
|
|
949
|
-
var
|
|
1011
|
+
var modelSchema5 = TypeReplicateArray(TypeModel("model:TextGenerationTask"));
|
|
950
1012
|
var TextGenerationInputSchema = {
|
|
951
1013
|
type: "object",
|
|
952
1014
|
properties: {
|
|
953
|
-
model:
|
|
1015
|
+
model: modelSchema5,
|
|
954
1016
|
prompt: TypeReplicateArray({
|
|
955
1017
|
type: "string",
|
|
956
1018
|
title: "Prompt",
|
|
@@ -1025,14 +1087,14 @@ class TextGenerationTask extends AiTask {
|
|
|
1025
1087
|
return TextGenerationOutputSchema;
|
|
1026
1088
|
}
|
|
1027
1089
|
}
|
|
1028
|
-
|
|
1090
|
+
TaskRegistry6.registerTask(TextGenerationTask);
|
|
1029
1091
|
var TextGeneration = (input, config) => {
|
|
1030
1092
|
return new TextGenerationTask(input, config).run();
|
|
1031
1093
|
};
|
|
1032
|
-
|
|
1094
|
+
Workflow6.prototype.TextGeneration = CreateWorkflow6(TextGenerationTask);
|
|
1033
1095
|
// src/task/TextLanguageDetectionTask.ts
|
|
1034
|
-
import { CreateWorkflow as
|
|
1035
|
-
var
|
|
1096
|
+
import { CreateWorkflow as CreateWorkflow7, TaskRegistry as TaskRegistry7, Workflow as Workflow7 } from "@workglow/task-graph";
|
|
1097
|
+
var modelSchema6 = TypeReplicateArray(TypeModel("model:TextLanguageDetectionTask"));
|
|
1036
1098
|
var TextLanguageDetectionInputSchema = {
|
|
1037
1099
|
type: "object",
|
|
1038
1100
|
properties: {
|
|
@@ -1042,20 +1104,14 @@ var TextLanguageDetectionInputSchema = {
|
|
|
1042
1104
|
description: "The text to detect the language of"
|
|
1043
1105
|
}),
|
|
1044
1106
|
maxLanguages: {
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
maximum: 1000
|
|
1050
|
-
},
|
|
1051
|
-
{
|
|
1052
|
-
type: "null"
|
|
1053
|
-
}
|
|
1054
|
-
],
|
|
1107
|
+
type: "number",
|
|
1108
|
+
minimum: 0,
|
|
1109
|
+
maximum: 100,
|
|
1110
|
+
default: 5,
|
|
1055
1111
|
title: "Max Languages",
|
|
1056
1112
|
description: "The maximum number of languages to return"
|
|
1057
1113
|
},
|
|
1058
|
-
model:
|
|
1114
|
+
model: modelSchema6
|
|
1059
1115
|
},
|
|
1060
1116
|
required: ["text", "model"],
|
|
1061
1117
|
additionalProperties: false
|
|
@@ -1102,13 +1158,91 @@ class TextLanguageDetectionTask extends AiTask {
|
|
|
1102
1158
|
return TextLanguageDetectionOutputSchema;
|
|
1103
1159
|
}
|
|
1104
1160
|
}
|
|
1105
|
-
|
|
1161
|
+
TaskRegistry7.registerTask(TextLanguageDetectionTask);
|
|
1106
1162
|
var TextLanguageDetection = (input, config) => {
|
|
1107
1163
|
return new TextLanguageDetectionTask(input, config).run();
|
|
1108
1164
|
};
|
|
1109
|
-
|
|
1165
|
+
Workflow7.prototype.TextLanguageDetection = CreateWorkflow7(TextLanguageDetectionTask);
|
|
1166
|
+
// src/task/TextNamedEntityRecognitionTask.ts
|
|
1167
|
+
import { CreateWorkflow as CreateWorkflow8, TaskRegistry as TaskRegistry8, Workflow as Workflow8 } from "@workglow/task-graph";
|
|
1168
|
+
var modelSchema7 = TypeReplicateArray(TypeModel("model:NamedEntityRecognitionTask"));
|
|
1169
|
+
var TextNamedEntityRecognitionInputSchema = {
|
|
1170
|
+
type: "object",
|
|
1171
|
+
properties: {
|
|
1172
|
+
text: TypeReplicateArray({
|
|
1173
|
+
type: "string",
|
|
1174
|
+
title: "Text",
|
|
1175
|
+
description: "The text to extract named entities from"
|
|
1176
|
+
}),
|
|
1177
|
+
blockList: {
|
|
1178
|
+
type: "array",
|
|
1179
|
+
items: {
|
|
1180
|
+
type: "string"
|
|
1181
|
+
},
|
|
1182
|
+
title: "Block List",
|
|
1183
|
+
description: "The entity types to exclude from results",
|
|
1184
|
+
"x-ui-group": "Configuration",
|
|
1185
|
+
"x-ui-group-open": false
|
|
1186
|
+
},
|
|
1187
|
+
model: modelSchema7
|
|
1188
|
+
},
|
|
1189
|
+
required: ["text", "model"],
|
|
1190
|
+
additionalProperties: false
|
|
1191
|
+
};
|
|
1192
|
+
var TextNamedEntityRecognitionOutputSchema = {
|
|
1193
|
+
type: "object",
|
|
1194
|
+
properties: {
|
|
1195
|
+
entities: {
|
|
1196
|
+
type: "array",
|
|
1197
|
+
items: {
|
|
1198
|
+
type: "object",
|
|
1199
|
+
properties: {
|
|
1200
|
+
entity: {
|
|
1201
|
+
type: "string",
|
|
1202
|
+
title: "Entity",
|
|
1203
|
+
description: "The type of the named entity"
|
|
1204
|
+
},
|
|
1205
|
+
score: {
|
|
1206
|
+
type: "number",
|
|
1207
|
+
title: "Score",
|
|
1208
|
+
description: "The confidence score for this entity"
|
|
1209
|
+
},
|
|
1210
|
+
word: {
|
|
1211
|
+
type: "string",
|
|
1212
|
+
title: "Word",
|
|
1213
|
+
description: "The extracted text of the named entity"
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
required: ["entity", "score", "word"],
|
|
1217
|
+
additionalProperties: false
|
|
1218
|
+
},
|
|
1219
|
+
title: "Entities",
|
|
1220
|
+
description: "The extracted named entities with their types, scores, and text"
|
|
1221
|
+
}
|
|
1222
|
+
},
|
|
1223
|
+
required: ["entities"],
|
|
1224
|
+
additionalProperties: false
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1227
|
+
class TextNamedEntityRecognitionTask extends AiTask {
|
|
1228
|
+
static type = "TextNamedEntityRecognitionTask";
|
|
1229
|
+
static category = "AI Text Model";
|
|
1230
|
+
static title = "Text Named Entity Recognition";
|
|
1231
|
+
static description = "Extracts named entities from text using language models";
|
|
1232
|
+
static inputSchema() {
|
|
1233
|
+
return TextNamedEntityRecognitionInputSchema;
|
|
1234
|
+
}
|
|
1235
|
+
static outputSchema() {
|
|
1236
|
+
return TextNamedEntityRecognitionOutputSchema;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
TaskRegistry8.registerTask(TextNamedEntityRecognitionTask);
|
|
1240
|
+
var TextNamedEntityRecognition = (input, config) => {
|
|
1241
|
+
return new TextNamedEntityRecognitionTask(input, config).run();
|
|
1242
|
+
};
|
|
1243
|
+
Workflow8.prototype.TextNamedEntityRecognition = CreateWorkflow8(TextNamedEntityRecognitionTask);
|
|
1110
1244
|
// src/task/TextQuestionAnswerTask.ts
|
|
1111
|
-
import { CreateWorkflow as
|
|
1245
|
+
import { CreateWorkflow as CreateWorkflow9, TaskRegistry as TaskRegistry9, Workflow as Workflow9 } from "@workglow/task-graph";
|
|
1112
1246
|
var contextSchema = {
|
|
1113
1247
|
type: "string",
|
|
1114
1248
|
title: "Context",
|
|
@@ -1124,13 +1258,13 @@ var textSchema = {
|
|
|
1124
1258
|
title: "Text",
|
|
1125
1259
|
description: "The generated text"
|
|
1126
1260
|
};
|
|
1127
|
-
var
|
|
1261
|
+
var modelSchema8 = TypeReplicateArray(TypeModel("model:TextQuestionAnswerTask"));
|
|
1128
1262
|
var TextQuestionAnswerInputSchema = {
|
|
1129
1263
|
type: "object",
|
|
1130
1264
|
properties: {
|
|
1131
1265
|
context: TypeReplicateArray(contextSchema),
|
|
1132
1266
|
question: TypeReplicateArray(questionSchema),
|
|
1133
|
-
model:
|
|
1267
|
+
model: modelSchema8
|
|
1134
1268
|
},
|
|
1135
1269
|
required: ["context", "question", "model"],
|
|
1136
1270
|
additionalProperties: false
|
|
@@ -1160,14 +1294,14 @@ class TextQuestionAnswerTask extends AiTask {
|
|
|
1160
1294
|
return TextQuestionAnswerOutputSchema;
|
|
1161
1295
|
}
|
|
1162
1296
|
}
|
|
1163
|
-
|
|
1297
|
+
TaskRegistry9.registerTask(TextQuestionAnswerTask);
|
|
1164
1298
|
var TextQuestionAnswer = (input, config) => {
|
|
1165
1299
|
return new TextQuestionAnswerTask(input, config).run();
|
|
1166
1300
|
};
|
|
1167
|
-
|
|
1301
|
+
Workflow9.prototype.TextQuestionAnswer = CreateWorkflow9(TextQuestionAnswerTask);
|
|
1168
1302
|
// src/task/TextRewriterTask.ts
|
|
1169
|
-
import { CreateWorkflow as
|
|
1170
|
-
var
|
|
1303
|
+
import { CreateWorkflow as CreateWorkflow10, TaskRegistry as TaskRegistry10, Workflow as Workflow10 } from "@workglow/task-graph";
|
|
1304
|
+
var modelSchema9 = TypeReplicateArray(TypeModel("model:TextRewriterTask"));
|
|
1171
1305
|
var TextRewriterInputSchema = {
|
|
1172
1306
|
type: "object",
|
|
1173
1307
|
properties: {
|
|
@@ -1181,7 +1315,7 @@ var TextRewriterInputSchema = {
|
|
|
1181
1315
|
title: "Prompt",
|
|
1182
1316
|
description: "The prompt to direct the rewriting"
|
|
1183
1317
|
}),
|
|
1184
|
-
model:
|
|
1318
|
+
model: modelSchema9
|
|
1185
1319
|
},
|
|
1186
1320
|
required: ["text", "prompt", "model"],
|
|
1187
1321
|
additionalProperties: false
|
|
@@ -1211,14 +1345,14 @@ class TextRewriterTask extends AiTask {
|
|
|
1211
1345
|
return TextRewriterOutputSchema;
|
|
1212
1346
|
}
|
|
1213
1347
|
}
|
|
1214
|
-
|
|
1348
|
+
TaskRegistry10.registerTask(TextRewriterTask);
|
|
1215
1349
|
var TextRewriter = (input, config) => {
|
|
1216
1350
|
return new TextRewriterTask(input, config).run();
|
|
1217
1351
|
};
|
|
1218
|
-
|
|
1352
|
+
Workflow10.prototype.TextRewriter = CreateWorkflow10(TextRewriterTask);
|
|
1219
1353
|
// src/task/TextSummaryTask.ts
|
|
1220
|
-
import { CreateWorkflow as
|
|
1221
|
-
var
|
|
1354
|
+
import { CreateWorkflow as CreateWorkflow11, TaskRegistry as TaskRegistry11, Workflow as Workflow11 } from "@workglow/task-graph";
|
|
1355
|
+
var modelSchema10 = TypeReplicateArray(TypeModel("model:TextSummaryTask"));
|
|
1222
1356
|
var TextSummaryInputSchema = {
|
|
1223
1357
|
type: "object",
|
|
1224
1358
|
properties: {
|
|
@@ -1227,7 +1361,7 @@ var TextSummaryInputSchema = {
|
|
|
1227
1361
|
title: "Text",
|
|
1228
1362
|
description: "The text to summarize"
|
|
1229
1363
|
}),
|
|
1230
|
-
model:
|
|
1364
|
+
model: modelSchema10
|
|
1231
1365
|
},
|
|
1232
1366
|
required: ["text", "model"],
|
|
1233
1367
|
additionalProperties: false
|
|
@@ -1257,14 +1391,14 @@ class TextSummaryTask extends AiTask {
|
|
|
1257
1391
|
return TextSummaryOutputSchema;
|
|
1258
1392
|
}
|
|
1259
1393
|
}
|
|
1260
|
-
|
|
1394
|
+
TaskRegistry11.registerTask(TextSummaryTask);
|
|
1261
1395
|
var TextSummary = async (input, config) => {
|
|
1262
1396
|
return new TextSummaryTask(input, config).run();
|
|
1263
1397
|
};
|
|
1264
|
-
|
|
1398
|
+
Workflow11.prototype.TextSummary = CreateWorkflow11(TextSummaryTask);
|
|
1265
1399
|
// src/task/TextTranslationTask.ts
|
|
1266
|
-
import { CreateWorkflow as
|
|
1267
|
-
var
|
|
1400
|
+
import { CreateWorkflow as CreateWorkflow12, TaskRegistry as TaskRegistry12, Workflow as Workflow12 } from "@workglow/task-graph";
|
|
1401
|
+
var modelSchema11 = TypeReplicateArray(TypeModel("model:TextTranslationTask"));
|
|
1268
1402
|
var translationTextSchema = {
|
|
1269
1403
|
type: "string",
|
|
1270
1404
|
title: "Text",
|
|
@@ -1290,7 +1424,7 @@ var TextTranslationInputSchema = {
|
|
|
1290
1424
|
minLength: 2,
|
|
1291
1425
|
maxLength: 2
|
|
1292
1426
|
})),
|
|
1293
|
-
model:
|
|
1427
|
+
model: modelSchema11
|
|
1294
1428
|
},
|
|
1295
1429
|
required: ["text", "source_lang", "target_lang", "model"],
|
|
1296
1430
|
additionalProperties: false
|
|
@@ -1326,18 +1460,18 @@ class TextTranslationTask extends AiTask {
|
|
|
1326
1460
|
return TextTranslationOutputSchema;
|
|
1327
1461
|
}
|
|
1328
1462
|
}
|
|
1329
|
-
|
|
1463
|
+
TaskRegistry12.registerTask(TextTranslationTask);
|
|
1330
1464
|
var TextTranslation = (input, config) => {
|
|
1331
1465
|
return new TextTranslationTask(input, config).run();
|
|
1332
1466
|
};
|
|
1333
|
-
|
|
1467
|
+
Workflow12.prototype.TextTranslation = CreateWorkflow12(TextTranslationTask);
|
|
1334
1468
|
// src/task/UnloadModelTask.ts
|
|
1335
|
-
import { CreateWorkflow as
|
|
1336
|
-
var
|
|
1469
|
+
import { CreateWorkflow as CreateWorkflow13, TaskRegistry as TaskRegistry13, Workflow as Workflow13 } from "@workglow/task-graph";
|
|
1470
|
+
var modelSchema12 = TypeReplicateArray(TypeModel("model"));
|
|
1337
1471
|
var UnloadModelInputSchema = {
|
|
1338
1472
|
type: "object",
|
|
1339
1473
|
properties: {
|
|
1340
|
-
model:
|
|
1474
|
+
model: modelSchema12
|
|
1341
1475
|
},
|
|
1342
1476
|
required: ["model"],
|
|
1343
1477
|
additionalProperties: false
|
|
@@ -1345,7 +1479,7 @@ var UnloadModelInputSchema = {
|
|
|
1345
1479
|
var UnloadModelOutputSchema = {
|
|
1346
1480
|
type: "object",
|
|
1347
1481
|
properties: {
|
|
1348
|
-
model:
|
|
1482
|
+
model: modelSchema12
|
|
1349
1483
|
},
|
|
1350
1484
|
required: ["model"],
|
|
1351
1485
|
additionalProperties: false
|
|
@@ -1364,18 +1498,18 @@ class UnloadModelTask extends AiTask {
|
|
|
1364
1498
|
}
|
|
1365
1499
|
static cacheable = false;
|
|
1366
1500
|
}
|
|
1367
|
-
|
|
1501
|
+
TaskRegistry13.registerTask(UnloadModelTask);
|
|
1368
1502
|
var UnloadModel = (input, config) => {
|
|
1369
1503
|
return new UnloadModelTask(input, config).run();
|
|
1370
1504
|
};
|
|
1371
|
-
|
|
1505
|
+
Workflow13.prototype.UnloadModel = CreateWorkflow13(UnloadModelTask);
|
|
1372
1506
|
// src/task/VectorSimilarityTask.ts
|
|
1373
1507
|
import {
|
|
1374
1508
|
ArrayTask,
|
|
1375
|
-
CreateWorkflow as
|
|
1509
|
+
CreateWorkflow as CreateWorkflow14,
|
|
1376
1510
|
TaskError,
|
|
1377
|
-
TaskRegistry as
|
|
1378
|
-
Workflow as
|
|
1511
|
+
TaskRegistry as TaskRegistry14,
|
|
1512
|
+
Workflow as Workflow14
|
|
1379
1513
|
} from "@workglow/task-graph";
|
|
1380
1514
|
var SimilarityFn = {
|
|
1381
1515
|
COSINE: "cosine",
|
|
@@ -1469,11 +1603,11 @@ class VectorSimilarityTask extends ArrayTask {
|
|
|
1469
1603
|
};
|
|
1470
1604
|
}
|
|
1471
1605
|
}
|
|
1472
|
-
|
|
1606
|
+
TaskRegistry14.registerTask(VectorSimilarityTask);
|
|
1473
1607
|
var Similarity = (input, config) => {
|
|
1474
1608
|
return new VectorSimilarityTask(input, config).run();
|
|
1475
1609
|
};
|
|
1476
|
-
|
|
1610
|
+
Workflow14.prototype.Similarity = CreateWorkflow14(VectorSimilarityTask);
|
|
1477
1611
|
function inner(arr1, arr2) {
|
|
1478
1612
|
return 1 - arr1.reduce((acc, val, i) => acc + val * arr2[i], 0);
|
|
1479
1613
|
}
|
|
@@ -1533,6 +1667,10 @@ export {
|
|
|
1533
1667
|
TextQuestionAnswerOutputSchema,
|
|
1534
1668
|
TextQuestionAnswerInputSchema,
|
|
1535
1669
|
TextQuestionAnswer,
|
|
1670
|
+
TextNamedEntityRecognitionTask,
|
|
1671
|
+
TextNamedEntityRecognitionOutputSchema,
|
|
1672
|
+
TextNamedEntityRecognitionInputSchema,
|
|
1673
|
+
TextNamedEntityRecognition,
|
|
1536
1674
|
TextLanguageDetectionTask,
|
|
1537
1675
|
TextLanguageDetectionOutputSchema,
|
|
1538
1676
|
TextLanguageDetectionInputSchema,
|
|
@@ -1542,6 +1680,10 @@ export {
|
|
|
1542
1680
|
TextGenerationInputSchema,
|
|
1543
1681
|
TextGeneration,
|
|
1544
1682
|
TextFragment,
|
|
1683
|
+
TextFillMaskTask,
|
|
1684
|
+
TextFillMaskOutputSchema,
|
|
1685
|
+
TextFillMaskInputSchema,
|
|
1686
|
+
TextFillMask,
|
|
1545
1687
|
TextEmbeddingTask,
|
|
1546
1688
|
TextEmbeddingOutputSchema,
|
|
1547
1689
|
TextEmbeddingInputSchema,
|
|
@@ -1573,4 +1715,4 @@ export {
|
|
|
1573
1715
|
AiJob
|
|
1574
1716
|
};
|
|
1575
1717
|
|
|
1576
|
-
//# debugId=
|
|
1718
|
+
//# debugId=9A48653B4A13DC8664756E2164756E21
|