@workglow/ai-provider 0.0.89 → 0.0.91

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.
Files changed (96) hide show
  1. package/README.md +45 -45
  2. package/dist/anthropic/AnthropicProvider.d.ts +39 -0
  3. package/dist/anthropic/AnthropicProvider.d.ts.map +1 -0
  4. package/dist/anthropic/Anthropic_Worker.d.ts +7 -0
  5. package/dist/anthropic/Anthropic_Worker.d.ts.map +1 -0
  6. package/dist/anthropic/common/Anthropic_Constants.d.ts +7 -0
  7. package/dist/anthropic/common/Anthropic_Constants.d.ts.map +1 -0
  8. package/dist/anthropic/common/Anthropic_JobRunFns.d.ts +16 -0
  9. package/dist/anthropic/common/Anthropic_JobRunFns.d.ts.map +1 -0
  10. package/dist/anthropic/common/Anthropic_ModelSchema.d.ts +167 -0
  11. package/dist/anthropic/common/Anthropic_ModelSchema.d.ts.map +1 -0
  12. package/dist/anthropic/index.d.ts +11 -0
  13. package/dist/anthropic/index.d.ts.map +1 -0
  14. package/dist/anthropic/index.js +257 -0
  15. package/dist/anthropic/index.js.map +14 -0
  16. package/dist/google-gemini/Gemini_Worker.d.ts +7 -0
  17. package/dist/google-gemini/Gemini_Worker.d.ts.map +1 -0
  18. package/dist/google-gemini/GoogleGeminiProvider.d.ts +36 -0
  19. package/dist/google-gemini/GoogleGeminiProvider.d.ts.map +1 -0
  20. package/dist/google-gemini/common/Gemini_Constants.d.ts +7 -0
  21. package/dist/google-gemini/common/Gemini_Constants.d.ts.map +1 -0
  22. package/dist/google-gemini/common/Gemini_JobRunFns.d.ts +17 -0
  23. package/dist/google-gemini/common/Gemini_JobRunFns.d.ts.map +1 -0
  24. package/dist/google-gemini/common/Gemini_ModelSchema.d.ts +164 -0
  25. package/dist/google-gemini/common/Gemini_ModelSchema.d.ts.map +1 -0
  26. package/dist/google-gemini/index.d.ts +11 -0
  27. package/dist/google-gemini/index.d.ts.map +1 -0
  28. package/dist/google-gemini/index.js +300 -0
  29. package/dist/google-gemini/index.js.map +14 -0
  30. package/dist/hf-transformers/HFT_Worker.d.ts +7 -0
  31. package/dist/hf-transformers/HFT_Worker.d.ts.map +1 -0
  32. package/dist/hf-transformers/HuggingFaceTransformersProvider.d.ts +41 -0
  33. package/dist/hf-transformers/HuggingFaceTransformersProvider.d.ts.map +1 -0
  34. package/dist/hf-transformers/common/HFT_JobRunFns.d.ts +1218 -1
  35. package/dist/hf-transformers/common/HFT_JobRunFns.d.ts.map +1 -1
  36. package/dist/hf-transformers/index.d.ts +2 -3
  37. package/dist/hf-transformers/index.d.ts.map +1 -1
  38. package/dist/hf-transformers/index.js +1130 -0
  39. package/dist/hf-transformers/index.js.map +15 -0
  40. package/dist/index.d.ts +23 -2
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +729 -865
  43. package/dist/index.js.map +20 -12
  44. package/dist/provider-ollama/OllamaProvider.d.ts +39 -0
  45. package/dist/provider-ollama/OllamaProvider.d.ts.map +1 -0
  46. package/dist/provider-ollama/Ollama_Worker.d.ts +7 -0
  47. package/dist/provider-ollama/Ollama_Worker.d.ts.map +1 -0
  48. package/dist/provider-ollama/common/Ollama_Constants.d.ts +8 -0
  49. package/dist/provider-ollama/common/Ollama_Constants.d.ts.map +1 -0
  50. package/dist/provider-ollama/common/Ollama_JobRunFns.d.ts +17 -0
  51. package/dist/provider-ollama/common/Ollama_JobRunFns.d.ts.map +1 -0
  52. package/dist/provider-ollama/common/Ollama_ModelSchema.d.ts +137 -0
  53. package/dist/provider-ollama/common/Ollama_ModelSchema.d.ts.map +1 -0
  54. package/dist/provider-ollama/index.d.ts +11 -0
  55. package/dist/provider-ollama/index.d.ts.map +1 -0
  56. package/dist/provider-ollama/index.js +274 -0
  57. package/dist/provider-ollama/index.js.map +14 -0
  58. package/dist/provider-openai/OpenAI_Worker.d.ts +7 -0
  59. package/dist/provider-openai/OpenAI_Worker.d.ts.map +1 -0
  60. package/dist/provider-openai/OpenAiProvider.d.ts +40 -0
  61. package/dist/provider-openai/OpenAiProvider.d.ts.map +1 -0
  62. package/dist/provider-openai/common/OpenAI_Constants.d.ts +7 -0
  63. package/dist/provider-openai/common/OpenAI_Constants.d.ts.map +1 -0
  64. package/dist/provider-openai/common/OpenAI_JobRunFns.d.ts +17 -0
  65. package/dist/provider-openai/common/OpenAI_JobRunFns.d.ts.map +1 -0
  66. package/dist/provider-openai/common/OpenAI_ModelSchema.d.ts +161 -0
  67. package/dist/provider-openai/common/OpenAI_ModelSchema.d.ts.map +1 -0
  68. package/dist/provider-openai/index.d.ts +11 -0
  69. package/dist/provider-openai/index.d.ts.map +1 -0
  70. package/dist/provider-openai/index.js +283 -0
  71. package/dist/provider-openai/index.js.map +14 -0
  72. package/dist/tf-mediapipe/TFMP_Worker.d.ts +7 -0
  73. package/dist/tf-mediapipe/TFMP_Worker.d.ts.map +1 -0
  74. package/dist/tf-mediapipe/TensorFlowMediaPipeProvider.d.ts +39 -0
  75. package/dist/tf-mediapipe/TensorFlowMediaPipeProvider.d.ts.map +1 -0
  76. package/dist/tf-mediapipe/common/TFMP_JobRunFns.d.ts +842 -0
  77. package/dist/tf-mediapipe/common/TFMP_JobRunFns.d.ts.map +1 -1
  78. package/dist/tf-mediapipe/index.d.ts +2 -3
  79. package/dist/tf-mediapipe/index.d.ts.map +1 -1
  80. package/dist/tf-mediapipe/index.js +674 -0
  81. package/dist/tf-mediapipe/index.js.map +14 -0
  82. package/package.json +87 -22
  83. package/dist/hf-transformers/registry/HFT_Client_RegisterJobFns.d.ts +0 -17
  84. package/dist/hf-transformers/registry/HFT_Client_RegisterJobFns.d.ts.map +0 -1
  85. package/dist/hf-transformers/registry/HFT_Inline_RegisterJobFns.d.ts +0 -16
  86. package/dist/hf-transformers/registry/HFT_Inline_RegisterJobFns.d.ts.map +0 -1
  87. package/dist/hf-transformers/registry/HFT_Worker_RegisterJobFns.d.ts +0 -8
  88. package/dist/hf-transformers/registry/HFT_Worker_RegisterJobFns.d.ts.map +0 -1
  89. package/dist/openai/provider/OpenAI_TaskRun.d.ts +0 -2
  90. package/dist/openai/provider/OpenAI_TaskRun.d.ts.map +0 -1
  91. package/dist/tf-mediapipe/registry/TFMP_Client_RegisterJobFns.d.ts +0 -17
  92. package/dist/tf-mediapipe/registry/TFMP_Client_RegisterJobFns.d.ts.map +0 -1
  93. package/dist/tf-mediapipe/registry/TFMP_Inline_RegisterJobFns.d.ts +0 -16
  94. package/dist/tf-mediapipe/registry/TFMP_Inline_RegisterJobFns.d.ts.map +0 -1
  95. package/dist/tf-mediapipe/registry/TFMP_Worker_RegisterJobFns.d.ts +0 -8
  96. package/dist/tf-mediapipe/registry/TFMP_Worker_RegisterJobFns.d.ts.map +0 -1
@@ -3,7 +3,8 @@
3
3
  * Copyright 2025 Steven Roussey <sroussey@gmail.com>
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import type { AiProviderRunFn, BackgroundRemovalTaskInput, BackgroundRemovalTaskOutput, DownloadModelTaskRunInput, DownloadModelTaskRunOutput, ImageClassificationTaskInput, ImageClassificationTaskOutput, ImageEmbeddingTaskInput, ImageEmbeddingTaskOutput, ImageSegmentationTaskInput, ImageSegmentationTaskOutput, ImageToTextTaskInput, ImageToTextTaskOutput, ObjectDetectionTaskInput, ObjectDetectionTaskOutput, TextClassificationTaskInput, TextClassificationTaskOutput, TextEmbeddingTaskInput, TextEmbeddingTaskOutput, TextFillMaskTaskInput, TextFillMaskTaskOutput, TextGenerationTaskInput, TextGenerationTaskOutput, TextLanguageDetectionTaskInput, TextLanguageDetectionTaskOutput, TextNamedEntityRecognitionTaskInput, TextNamedEntityRecognitionTaskOutput, TextQuestionAnswerTaskInput, TextQuestionAnswerTaskOutput, TextRewriterTaskInput, TextRewriterTaskOutput, TextSummaryTaskInput, TextSummaryTaskOutput, TextTranslationTaskInput, TextTranslationTaskOutput, UnloadModelTaskRunInput, UnloadModelTaskRunOutput } from "@workglow/ai";
6
+ import type { AiProviderRunFn, AiProviderStreamFn, BackgroundRemovalTaskInput, BackgroundRemovalTaskOutput, DownloadModelTaskRunInput, DownloadModelTaskRunOutput, ImageClassificationTaskInput, ImageClassificationTaskOutput, ImageEmbeddingTaskInput, ImageEmbeddingTaskOutput, ImageSegmentationTaskInput, ImageSegmentationTaskOutput, ImageToTextTaskInput, ImageToTextTaskOutput, ObjectDetectionTaskInput, ObjectDetectionTaskOutput, TextClassificationTaskInput, TextClassificationTaskOutput, TextEmbeddingTaskInput, TextEmbeddingTaskOutput, TextFillMaskTaskInput, TextFillMaskTaskOutput, TextGenerationTaskInput, TextGenerationTaskOutput, TextLanguageDetectionTaskInput, TextLanguageDetectionTaskOutput, TextNamedEntityRecognitionTaskInput, TextNamedEntityRecognitionTaskOutput, TextQuestionAnswerTaskInput, TextQuestionAnswerTaskOutput, TextRewriterTaskInput, TextRewriterTaskOutput, TextSummaryTaskInput, TextSummaryTaskOutput, TextTranslationTaskInput, TextTranslationTaskOutput, UnloadModelTaskRunInput, UnloadModelTaskRunOutput } from "@workglow/ai";
7
+ import { TypedArray } from "@workglow/util";
7
8
  import { HfTransformersOnnxModelConfig } from "./HFT_ModelSchema";
8
9
  /**
9
10
  * Clear all cached pipelines
@@ -79,4 +80,1220 @@ export declare const HFT_ImageClassification: AiProviderRunFn<ImageClassificatio
79
80
  * Auto-selects between regular and zero-shot detection.
80
81
  */
81
82
  export declare const HFT_ObjectDetection: AiProviderRunFn<ObjectDetectionTaskInput, ObjectDetectionTaskOutput, HfTransformersOnnxModelConfig>;
83
+ export declare const HFT_TextGeneration_Stream: AiProviderStreamFn<TextGenerationTaskInput, TextGenerationTaskOutput, HfTransformersOnnxModelConfig>;
84
+ export declare const HFT_TextRewriter_Stream: AiProviderStreamFn<TextRewriterTaskInput, TextRewriterTaskOutput, HfTransformersOnnxModelConfig>;
85
+ export declare const HFT_TextSummary_Stream: AiProviderStreamFn<TextSummaryTaskInput, TextSummaryTaskOutput, HfTransformersOnnxModelConfig>;
86
+ export declare const HFT_TextQuestionAnswer_Stream: AiProviderStreamFn<TextQuestionAnswerTaskInput, TextQuestionAnswerTaskOutput, HfTransformersOnnxModelConfig>;
87
+ export declare const HFT_TextTranslation_Stream: AiProviderStreamFn<TextTranslationTaskInput, TextTranslationTaskOutput, HfTransformersOnnxModelConfig>;
88
+ /**
89
+ * All HuggingFace Transformers task run functions, keyed by task type name.
90
+ * Pass this to `new HuggingFaceTransformersProvider(HFT_TASKS)` when the
91
+ * actual run function implementations are needed (inline mode, worker server).
92
+ */
93
+ export declare const HFT_TASKS: {
94
+ readonly DownloadModelTask: AiProviderRunFn<{
95
+ model: string | {
96
+ [x: string]: unknown;
97
+ title?: string | undefined;
98
+ description?: string | undefined;
99
+ model_id?: string | undefined;
100
+ tasks?: string[] | undefined;
101
+ metadata?: {
102
+ [x: string]: unknown;
103
+ } | undefined;
104
+ provider: string;
105
+ provider_config: {
106
+ [x: string]: unknown;
107
+ };
108
+ };
109
+ }, {
110
+ model: string | {
111
+ [x: string]: unknown;
112
+ title?: string | undefined;
113
+ description?: string | undefined;
114
+ model_id?: string | undefined;
115
+ tasks?: string[] | undefined;
116
+ metadata?: {
117
+ [x: string]: unknown;
118
+ } | undefined;
119
+ provider: string;
120
+ provider_config: {
121
+ [x: string]: unknown;
122
+ };
123
+ };
124
+ }, {
125
+ title?: string | undefined;
126
+ description?: string | undefined;
127
+ model_id?: string | undefined;
128
+ tasks?: string[] | undefined;
129
+ metadata?: {
130
+ [x: string]: unknown;
131
+ } | undefined;
132
+ provider: "HF_TRANSFORMERS_ONNX";
133
+ provider_config: {
134
+ normalize?: boolean | undefined;
135
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
136
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
137
+ execution_providers?: string[] | undefined;
138
+ intra_op_num_threads?: number | undefined;
139
+ inter_op_num_threads?: number | undefined;
140
+ use_external_data_format?: boolean | undefined;
141
+ pooling?: "mean" | "last_token" | "cls" | undefined;
142
+ language_style?: string | undefined;
143
+ mrl?: boolean | undefined;
144
+ pipeline: "feature-extraction";
145
+ model_path: string;
146
+ native_dimensions: number;
147
+ } | {
148
+ normalize?: boolean | undefined;
149
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
150
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
151
+ execution_providers?: string[] | undefined;
152
+ intra_op_num_threads?: number | undefined;
153
+ inter_op_num_threads?: number | undefined;
154
+ use_external_data_format?: boolean | undefined;
155
+ native_dimensions?: number | undefined;
156
+ pooling?: "mean" | "last_token" | "cls" | undefined;
157
+ language_style?: string | undefined;
158
+ mrl?: boolean | undefined;
159
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
160
+ model_path: string;
161
+ };
162
+ }>;
163
+ readonly UnloadModelTask: AiProviderRunFn<{
164
+ model: string | {
165
+ [x: string]: unknown;
166
+ title?: string | undefined;
167
+ description?: string | undefined;
168
+ model_id?: string | undefined;
169
+ tasks?: string[] | undefined;
170
+ metadata?: {
171
+ [x: string]: unknown;
172
+ } | undefined;
173
+ provider: string;
174
+ provider_config: {
175
+ [x: string]: unknown;
176
+ };
177
+ };
178
+ }, {
179
+ model: string | {
180
+ [x: string]: unknown;
181
+ title?: string | undefined;
182
+ description?: string | undefined;
183
+ model_id?: string | undefined;
184
+ tasks?: string[] | undefined;
185
+ metadata?: {
186
+ [x: string]: unknown;
187
+ } | undefined;
188
+ provider: string;
189
+ provider_config: {
190
+ [x: string]: unknown;
191
+ };
192
+ };
193
+ }, {
194
+ title?: string | undefined;
195
+ description?: string | undefined;
196
+ model_id?: string | undefined;
197
+ tasks?: string[] | undefined;
198
+ metadata?: {
199
+ [x: string]: unknown;
200
+ } | undefined;
201
+ provider: "HF_TRANSFORMERS_ONNX";
202
+ provider_config: {
203
+ normalize?: boolean | undefined;
204
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
205
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
206
+ execution_providers?: string[] | undefined;
207
+ intra_op_num_threads?: number | undefined;
208
+ inter_op_num_threads?: number | undefined;
209
+ use_external_data_format?: boolean | undefined;
210
+ pooling?: "mean" | "last_token" | "cls" | undefined;
211
+ language_style?: string | undefined;
212
+ mrl?: boolean | undefined;
213
+ pipeline: "feature-extraction";
214
+ model_path: string;
215
+ native_dimensions: number;
216
+ } | {
217
+ normalize?: boolean | undefined;
218
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
219
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
220
+ execution_providers?: string[] | undefined;
221
+ intra_op_num_threads?: number | undefined;
222
+ inter_op_num_threads?: number | undefined;
223
+ use_external_data_format?: boolean | undefined;
224
+ native_dimensions?: number | undefined;
225
+ pooling?: "mean" | "last_token" | "cls" | undefined;
226
+ language_style?: string | undefined;
227
+ mrl?: boolean | undefined;
228
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
229
+ model_path: string;
230
+ };
231
+ }>;
232
+ readonly TextEmbeddingTask: AiProviderRunFn<{
233
+ model: string | {
234
+ [x: string]: unknown;
235
+ title?: string | undefined;
236
+ description?: string | undefined;
237
+ model_id?: string | undefined;
238
+ tasks?: string[] | undefined;
239
+ metadata?: {
240
+ [x: string]: unknown;
241
+ } | undefined;
242
+ provider: string;
243
+ provider_config: {
244
+ [x: string]: unknown;
245
+ };
246
+ };
247
+ text: string | string[];
248
+ }, {
249
+ vector: TypedArray | TypedArray[];
250
+ }, {
251
+ title?: string | undefined;
252
+ description?: string | undefined;
253
+ model_id?: string | undefined;
254
+ tasks?: string[] | undefined;
255
+ metadata?: {
256
+ [x: string]: unknown;
257
+ } | undefined;
258
+ provider: "HF_TRANSFORMERS_ONNX";
259
+ provider_config: {
260
+ normalize?: boolean | undefined;
261
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
262
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
263
+ execution_providers?: string[] | undefined;
264
+ intra_op_num_threads?: number | undefined;
265
+ inter_op_num_threads?: number | undefined;
266
+ use_external_data_format?: boolean | undefined;
267
+ pooling?: "mean" | "last_token" | "cls" | undefined;
268
+ language_style?: string | undefined;
269
+ mrl?: boolean | undefined;
270
+ pipeline: "feature-extraction";
271
+ model_path: string;
272
+ native_dimensions: number;
273
+ } | {
274
+ normalize?: boolean | undefined;
275
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
276
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
277
+ execution_providers?: string[] | undefined;
278
+ intra_op_num_threads?: number | undefined;
279
+ inter_op_num_threads?: number | undefined;
280
+ use_external_data_format?: boolean | undefined;
281
+ native_dimensions?: number | undefined;
282
+ pooling?: "mean" | "last_token" | "cls" | undefined;
283
+ language_style?: string | undefined;
284
+ mrl?: boolean | undefined;
285
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
286
+ model_path: string;
287
+ };
288
+ }>;
289
+ readonly TextGenerationTask: AiProviderRunFn<{
290
+ maxTokens?: number | undefined;
291
+ temperature?: number | undefined;
292
+ topP?: number | undefined;
293
+ frequencyPenalty?: number | undefined;
294
+ presencePenalty?: number | undefined;
295
+ model: string | {
296
+ [x: string]: unknown;
297
+ title?: string | undefined;
298
+ description?: string | undefined;
299
+ model_id?: string | undefined;
300
+ tasks?: string[] | undefined;
301
+ metadata?: {
302
+ [x: string]: unknown;
303
+ } | undefined;
304
+ provider: string;
305
+ provider_config: {
306
+ [x: string]: unknown;
307
+ };
308
+ };
309
+ prompt: string;
310
+ }, {
311
+ text: string;
312
+ }, {
313
+ title?: string | undefined;
314
+ description?: string | undefined;
315
+ model_id?: string | undefined;
316
+ tasks?: string[] | undefined;
317
+ metadata?: {
318
+ [x: string]: unknown;
319
+ } | undefined;
320
+ provider: "HF_TRANSFORMERS_ONNX";
321
+ provider_config: {
322
+ normalize?: boolean | undefined;
323
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
324
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
325
+ execution_providers?: string[] | undefined;
326
+ intra_op_num_threads?: number | undefined;
327
+ inter_op_num_threads?: number | undefined;
328
+ use_external_data_format?: boolean | undefined;
329
+ pooling?: "mean" | "last_token" | "cls" | undefined;
330
+ language_style?: string | undefined;
331
+ mrl?: boolean | undefined;
332
+ pipeline: "feature-extraction";
333
+ model_path: string;
334
+ native_dimensions: number;
335
+ } | {
336
+ normalize?: boolean | undefined;
337
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
338
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
339
+ execution_providers?: string[] | undefined;
340
+ intra_op_num_threads?: number | undefined;
341
+ inter_op_num_threads?: number | undefined;
342
+ use_external_data_format?: boolean | undefined;
343
+ native_dimensions?: number | undefined;
344
+ pooling?: "mean" | "last_token" | "cls" | undefined;
345
+ language_style?: string | undefined;
346
+ mrl?: boolean | undefined;
347
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
348
+ model_path: string;
349
+ };
350
+ }>;
351
+ readonly TextQuestionAnswerTask: AiProviderRunFn<{
352
+ model: string | {
353
+ [x: string]: unknown;
354
+ title?: string | undefined;
355
+ description?: string | undefined;
356
+ model_id?: string | undefined;
357
+ tasks?: string[] | undefined;
358
+ metadata?: {
359
+ [x: string]: unknown;
360
+ } | undefined;
361
+ provider: string;
362
+ provider_config: {
363
+ [x: string]: unknown;
364
+ };
365
+ };
366
+ context: string;
367
+ question: string;
368
+ }, {
369
+ text: string;
370
+ }, {
371
+ title?: string | undefined;
372
+ description?: string | undefined;
373
+ model_id?: string | undefined;
374
+ tasks?: string[] | undefined;
375
+ metadata?: {
376
+ [x: string]: unknown;
377
+ } | undefined;
378
+ provider: "HF_TRANSFORMERS_ONNX";
379
+ provider_config: {
380
+ normalize?: boolean | undefined;
381
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
382
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
383
+ execution_providers?: string[] | undefined;
384
+ intra_op_num_threads?: number | undefined;
385
+ inter_op_num_threads?: number | undefined;
386
+ use_external_data_format?: boolean | undefined;
387
+ pooling?: "mean" | "last_token" | "cls" | undefined;
388
+ language_style?: string | undefined;
389
+ mrl?: boolean | undefined;
390
+ pipeline: "feature-extraction";
391
+ model_path: string;
392
+ native_dimensions: number;
393
+ } | {
394
+ normalize?: boolean | undefined;
395
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
396
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
397
+ execution_providers?: string[] | undefined;
398
+ intra_op_num_threads?: number | undefined;
399
+ inter_op_num_threads?: number | undefined;
400
+ use_external_data_format?: boolean | undefined;
401
+ native_dimensions?: number | undefined;
402
+ pooling?: "mean" | "last_token" | "cls" | undefined;
403
+ language_style?: string | undefined;
404
+ mrl?: boolean | undefined;
405
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
406
+ model_path: string;
407
+ };
408
+ }>;
409
+ readonly TextLanguageDetectionTask: AiProviderRunFn<{
410
+ maxLanguages?: number | undefined;
411
+ model: string | {
412
+ [x: string]: unknown;
413
+ title?: string | undefined;
414
+ description?: string | undefined;
415
+ model_id?: string | undefined;
416
+ tasks?: string[] | undefined;
417
+ metadata?: {
418
+ [x: string]: unknown;
419
+ } | undefined;
420
+ provider: string;
421
+ provider_config: {
422
+ [x: string]: unknown;
423
+ };
424
+ };
425
+ text: string;
426
+ }, {
427
+ languages: {
428
+ score: number;
429
+ language: string;
430
+ }[];
431
+ }, {
432
+ title?: string | undefined;
433
+ description?: string | undefined;
434
+ model_id?: string | undefined;
435
+ tasks?: string[] | undefined;
436
+ metadata?: {
437
+ [x: string]: unknown;
438
+ } | undefined;
439
+ provider: "HF_TRANSFORMERS_ONNX";
440
+ provider_config: {
441
+ normalize?: boolean | undefined;
442
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
443
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
444
+ execution_providers?: string[] | undefined;
445
+ intra_op_num_threads?: number | undefined;
446
+ inter_op_num_threads?: number | undefined;
447
+ use_external_data_format?: boolean | undefined;
448
+ pooling?: "mean" | "last_token" | "cls" | undefined;
449
+ language_style?: string | undefined;
450
+ mrl?: boolean | undefined;
451
+ pipeline: "feature-extraction";
452
+ model_path: string;
453
+ native_dimensions: number;
454
+ } | {
455
+ normalize?: boolean | undefined;
456
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
457
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
458
+ execution_providers?: string[] | undefined;
459
+ intra_op_num_threads?: number | undefined;
460
+ inter_op_num_threads?: number | undefined;
461
+ use_external_data_format?: boolean | undefined;
462
+ native_dimensions?: number | undefined;
463
+ pooling?: "mean" | "last_token" | "cls" | undefined;
464
+ language_style?: string | undefined;
465
+ mrl?: boolean | undefined;
466
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
467
+ model_path: string;
468
+ };
469
+ }>;
470
+ readonly TextClassificationTask: AiProviderRunFn<{
471
+ candidateLabels?: string[] | undefined;
472
+ maxCategories?: number | undefined;
473
+ model: string | {
474
+ [x: string]: unknown;
475
+ title?: string | undefined;
476
+ description?: string | undefined;
477
+ model_id?: string | undefined;
478
+ tasks?: string[] | undefined;
479
+ metadata?: {
480
+ [x: string]: unknown;
481
+ } | undefined;
482
+ provider: string;
483
+ provider_config: {
484
+ [x: string]: unknown;
485
+ };
486
+ };
487
+ text: string;
488
+ }, {
489
+ categories: {
490
+ label: string;
491
+ score: number;
492
+ }[];
493
+ }, {
494
+ title?: string | undefined;
495
+ description?: string | undefined;
496
+ model_id?: string | undefined;
497
+ tasks?: string[] | undefined;
498
+ metadata?: {
499
+ [x: string]: unknown;
500
+ } | undefined;
501
+ provider: "HF_TRANSFORMERS_ONNX";
502
+ provider_config: {
503
+ normalize?: boolean | undefined;
504
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
505
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
506
+ execution_providers?: string[] | undefined;
507
+ intra_op_num_threads?: number | undefined;
508
+ inter_op_num_threads?: number | undefined;
509
+ use_external_data_format?: boolean | undefined;
510
+ pooling?: "mean" | "last_token" | "cls" | undefined;
511
+ language_style?: string | undefined;
512
+ mrl?: boolean | undefined;
513
+ pipeline: "feature-extraction";
514
+ model_path: string;
515
+ native_dimensions: number;
516
+ } | {
517
+ normalize?: boolean | undefined;
518
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
519
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
520
+ execution_providers?: string[] | undefined;
521
+ intra_op_num_threads?: number | undefined;
522
+ inter_op_num_threads?: number | undefined;
523
+ use_external_data_format?: boolean | undefined;
524
+ native_dimensions?: number | undefined;
525
+ pooling?: "mean" | "last_token" | "cls" | undefined;
526
+ language_style?: string | undefined;
527
+ mrl?: boolean | undefined;
528
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
529
+ model_path: string;
530
+ };
531
+ }>;
532
+ readonly TextFillMaskTask: AiProviderRunFn<{
533
+ model: string | {
534
+ [x: string]: unknown;
535
+ title?: string | undefined;
536
+ description?: string | undefined;
537
+ model_id?: string | undefined;
538
+ tasks?: string[] | undefined;
539
+ metadata?: {
540
+ [x: string]: unknown;
541
+ } | undefined;
542
+ provider: string;
543
+ provider_config: {
544
+ [x: string]: unknown;
545
+ };
546
+ };
547
+ text: string;
548
+ }, {
549
+ predictions: {
550
+ score: number;
551
+ entity: string;
552
+ sequence: string;
553
+ }[];
554
+ }, {
555
+ title?: string | undefined;
556
+ description?: string | undefined;
557
+ model_id?: string | undefined;
558
+ tasks?: string[] | undefined;
559
+ metadata?: {
560
+ [x: string]: unknown;
561
+ } | undefined;
562
+ provider: "HF_TRANSFORMERS_ONNX";
563
+ provider_config: {
564
+ normalize?: boolean | undefined;
565
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
566
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
567
+ execution_providers?: string[] | undefined;
568
+ intra_op_num_threads?: number | undefined;
569
+ inter_op_num_threads?: number | undefined;
570
+ use_external_data_format?: boolean | undefined;
571
+ pooling?: "mean" | "last_token" | "cls" | undefined;
572
+ language_style?: string | undefined;
573
+ mrl?: boolean | undefined;
574
+ pipeline: "feature-extraction";
575
+ model_path: string;
576
+ native_dimensions: number;
577
+ } | {
578
+ normalize?: boolean | undefined;
579
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
580
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
581
+ execution_providers?: string[] | undefined;
582
+ intra_op_num_threads?: number | undefined;
583
+ inter_op_num_threads?: number | undefined;
584
+ use_external_data_format?: boolean | undefined;
585
+ native_dimensions?: number | undefined;
586
+ pooling?: "mean" | "last_token" | "cls" | undefined;
587
+ language_style?: string | undefined;
588
+ mrl?: boolean | undefined;
589
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
590
+ model_path: string;
591
+ };
592
+ }>;
593
+ readonly TextNamedEntityRecognitionTask: AiProviderRunFn<{
594
+ blockList?: string[] | undefined;
595
+ model: string | {
596
+ [x: string]: unknown;
597
+ title?: string | undefined;
598
+ description?: string | undefined;
599
+ model_id?: string | undefined;
600
+ tasks?: string[] | undefined;
601
+ metadata?: {
602
+ [x: string]: unknown;
603
+ } | undefined;
604
+ provider: string;
605
+ provider_config: {
606
+ [x: string]: unknown;
607
+ };
608
+ };
609
+ text: string;
610
+ }, {
611
+ entities: {
612
+ score: number;
613
+ entity: string;
614
+ word: string;
615
+ }[];
616
+ }, {
617
+ title?: string | undefined;
618
+ description?: string | undefined;
619
+ model_id?: string | undefined;
620
+ tasks?: string[] | undefined;
621
+ metadata?: {
622
+ [x: string]: unknown;
623
+ } | undefined;
624
+ provider: "HF_TRANSFORMERS_ONNX";
625
+ provider_config: {
626
+ normalize?: boolean | undefined;
627
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
628
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
629
+ execution_providers?: string[] | undefined;
630
+ intra_op_num_threads?: number | undefined;
631
+ inter_op_num_threads?: number | undefined;
632
+ use_external_data_format?: boolean | undefined;
633
+ pooling?: "mean" | "last_token" | "cls" | undefined;
634
+ language_style?: string | undefined;
635
+ mrl?: boolean | undefined;
636
+ pipeline: "feature-extraction";
637
+ model_path: string;
638
+ native_dimensions: number;
639
+ } | {
640
+ normalize?: boolean | undefined;
641
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
642
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
643
+ execution_providers?: string[] | undefined;
644
+ intra_op_num_threads?: number | undefined;
645
+ inter_op_num_threads?: number | undefined;
646
+ use_external_data_format?: boolean | undefined;
647
+ native_dimensions?: number | undefined;
648
+ pooling?: "mean" | "last_token" | "cls" | undefined;
649
+ language_style?: string | undefined;
650
+ mrl?: boolean | undefined;
651
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
652
+ model_path: string;
653
+ };
654
+ }>;
655
+ readonly TextRewriterTask: AiProviderRunFn<{
656
+ model: string | {
657
+ [x: string]: unknown;
658
+ title?: string | undefined;
659
+ description?: string | undefined;
660
+ model_id?: string | undefined;
661
+ tasks?: string[] | undefined;
662
+ metadata?: {
663
+ [x: string]: unknown;
664
+ } | undefined;
665
+ provider: string;
666
+ provider_config: {
667
+ [x: string]: unknown;
668
+ };
669
+ };
670
+ prompt: string;
671
+ text: string;
672
+ }, {
673
+ text: string;
674
+ }, {
675
+ title?: string | undefined;
676
+ description?: string | undefined;
677
+ model_id?: string | undefined;
678
+ tasks?: string[] | undefined;
679
+ metadata?: {
680
+ [x: string]: unknown;
681
+ } | undefined;
682
+ provider: "HF_TRANSFORMERS_ONNX";
683
+ provider_config: {
684
+ normalize?: boolean | undefined;
685
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
686
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
687
+ execution_providers?: string[] | undefined;
688
+ intra_op_num_threads?: number | undefined;
689
+ inter_op_num_threads?: number | undefined;
690
+ use_external_data_format?: boolean | undefined;
691
+ pooling?: "mean" | "last_token" | "cls" | undefined;
692
+ language_style?: string | undefined;
693
+ mrl?: boolean | undefined;
694
+ pipeline: "feature-extraction";
695
+ model_path: string;
696
+ native_dimensions: number;
697
+ } | {
698
+ normalize?: boolean | undefined;
699
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
700
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
701
+ execution_providers?: string[] | undefined;
702
+ intra_op_num_threads?: number | undefined;
703
+ inter_op_num_threads?: number | undefined;
704
+ use_external_data_format?: boolean | undefined;
705
+ native_dimensions?: number | undefined;
706
+ pooling?: "mean" | "last_token" | "cls" | undefined;
707
+ language_style?: string | undefined;
708
+ mrl?: boolean | undefined;
709
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
710
+ model_path: string;
711
+ };
712
+ }>;
713
+ readonly TextSummaryTask: AiProviderRunFn<{
714
+ model: string | {
715
+ [x: string]: unknown;
716
+ title?: string | undefined;
717
+ description?: string | undefined;
718
+ model_id?: string | undefined;
719
+ tasks?: string[] | undefined;
720
+ metadata?: {
721
+ [x: string]: unknown;
722
+ } | undefined;
723
+ provider: string;
724
+ provider_config: {
725
+ [x: string]: unknown;
726
+ };
727
+ };
728
+ text: string;
729
+ }, {
730
+ text: string;
731
+ }, {
732
+ title?: string | undefined;
733
+ description?: string | undefined;
734
+ model_id?: string | undefined;
735
+ tasks?: string[] | undefined;
736
+ metadata?: {
737
+ [x: string]: unknown;
738
+ } | undefined;
739
+ provider: "HF_TRANSFORMERS_ONNX";
740
+ provider_config: {
741
+ normalize?: boolean | undefined;
742
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
743
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
744
+ execution_providers?: string[] | undefined;
745
+ intra_op_num_threads?: number | undefined;
746
+ inter_op_num_threads?: number | undefined;
747
+ use_external_data_format?: boolean | undefined;
748
+ pooling?: "mean" | "last_token" | "cls" | undefined;
749
+ language_style?: string | undefined;
750
+ mrl?: boolean | undefined;
751
+ pipeline: "feature-extraction";
752
+ model_path: string;
753
+ native_dimensions: number;
754
+ } | {
755
+ normalize?: boolean | undefined;
756
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
757
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
758
+ execution_providers?: string[] | undefined;
759
+ intra_op_num_threads?: number | undefined;
760
+ inter_op_num_threads?: number | undefined;
761
+ use_external_data_format?: boolean | undefined;
762
+ native_dimensions?: number | undefined;
763
+ pooling?: "mean" | "last_token" | "cls" | undefined;
764
+ language_style?: string | undefined;
765
+ mrl?: boolean | undefined;
766
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
767
+ model_path: string;
768
+ };
769
+ }>;
770
+ readonly TextTranslationTask: AiProviderRunFn<{
771
+ model: string | {
772
+ [x: string]: unknown;
773
+ title?: string | undefined;
774
+ description?: string | undefined;
775
+ model_id?: string | undefined;
776
+ tasks?: string[] | undefined;
777
+ metadata?: {
778
+ [x: string]: unknown;
779
+ } | undefined;
780
+ provider: string;
781
+ provider_config: {
782
+ [x: string]: unknown;
783
+ };
784
+ };
785
+ text: string;
786
+ source_lang: string;
787
+ target_lang: string;
788
+ }, {
789
+ text: string;
790
+ target_lang: string;
791
+ }, {
792
+ title?: string | undefined;
793
+ description?: string | undefined;
794
+ model_id?: string | undefined;
795
+ tasks?: string[] | undefined;
796
+ metadata?: {
797
+ [x: string]: unknown;
798
+ } | undefined;
799
+ provider: "HF_TRANSFORMERS_ONNX";
800
+ provider_config: {
801
+ normalize?: boolean | undefined;
802
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
803
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
804
+ execution_providers?: string[] | undefined;
805
+ intra_op_num_threads?: number | undefined;
806
+ inter_op_num_threads?: number | undefined;
807
+ use_external_data_format?: boolean | undefined;
808
+ pooling?: "mean" | "last_token" | "cls" | undefined;
809
+ language_style?: string | undefined;
810
+ mrl?: boolean | undefined;
811
+ pipeline: "feature-extraction";
812
+ model_path: string;
813
+ native_dimensions: number;
814
+ } | {
815
+ normalize?: boolean | undefined;
816
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
817
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
818
+ execution_providers?: string[] | undefined;
819
+ intra_op_num_threads?: number | undefined;
820
+ inter_op_num_threads?: number | undefined;
821
+ use_external_data_format?: boolean | undefined;
822
+ native_dimensions?: number | undefined;
823
+ pooling?: "mean" | "last_token" | "cls" | undefined;
824
+ language_style?: string | undefined;
825
+ mrl?: boolean | undefined;
826
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
827
+ model_path: string;
828
+ };
829
+ }>;
830
+ readonly ImageSegmentationTask: AiProviderRunFn<{
831
+ threshold?: number | undefined;
832
+ maskThreshold?: number | undefined;
833
+ model: string | {
834
+ [x: string]: unknown;
835
+ title?: string | undefined;
836
+ description?: string | undefined;
837
+ model_id?: string | undefined;
838
+ tasks?: string[] | undefined;
839
+ metadata?: {
840
+ [x: string]: unknown;
841
+ } | undefined;
842
+ provider: string;
843
+ provider_config: {
844
+ [x: string]: unknown;
845
+ };
846
+ };
847
+ image: string | {
848
+ data: {
849
+ [x: string]: unknown;
850
+ } | {
851
+ rawChannels?: number | undefined;
852
+ data: number[];
853
+ width: number;
854
+ height: number;
855
+ channels: number;
856
+ };
857
+ width: number;
858
+ height: number;
859
+ channels: number;
860
+ };
861
+ }, {
862
+ masks: {
863
+ label: string;
864
+ score: number;
865
+ mask: {
866
+ [x: string]: unknown;
867
+ };
868
+ }[] | {
869
+ label: string;
870
+ score: number;
871
+ mask: {
872
+ [x: string]: unknown;
873
+ };
874
+ }[][];
875
+ }, {
876
+ title?: string | undefined;
877
+ description?: string | undefined;
878
+ model_id?: string | undefined;
879
+ tasks?: string[] | undefined;
880
+ metadata?: {
881
+ [x: string]: unknown;
882
+ } | undefined;
883
+ provider: "HF_TRANSFORMERS_ONNX";
884
+ provider_config: {
885
+ normalize?: boolean | undefined;
886
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
887
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
888
+ execution_providers?: string[] | undefined;
889
+ intra_op_num_threads?: number | undefined;
890
+ inter_op_num_threads?: number | undefined;
891
+ use_external_data_format?: boolean | undefined;
892
+ pooling?: "mean" | "last_token" | "cls" | undefined;
893
+ language_style?: string | undefined;
894
+ mrl?: boolean | undefined;
895
+ pipeline: "feature-extraction";
896
+ model_path: string;
897
+ native_dimensions: number;
898
+ } | {
899
+ normalize?: boolean | undefined;
900
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
901
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
902
+ execution_providers?: string[] | undefined;
903
+ intra_op_num_threads?: number | undefined;
904
+ inter_op_num_threads?: number | undefined;
905
+ use_external_data_format?: boolean | undefined;
906
+ native_dimensions?: number | undefined;
907
+ pooling?: "mean" | "last_token" | "cls" | undefined;
908
+ language_style?: string | undefined;
909
+ mrl?: boolean | undefined;
910
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
911
+ model_path: string;
912
+ };
913
+ }>;
914
+ readonly ImageToTextTask: AiProviderRunFn<{
915
+ maxTokens?: number | undefined;
916
+ model: string | {
917
+ [x: string]: unknown;
918
+ title?: string | undefined;
919
+ description?: string | undefined;
920
+ model_id?: string | undefined;
921
+ tasks?: string[] | undefined;
922
+ metadata?: {
923
+ [x: string]: unknown;
924
+ } | undefined;
925
+ provider: string;
926
+ provider_config: {
927
+ [x: string]: unknown;
928
+ };
929
+ };
930
+ image: string | {
931
+ data: {
932
+ [x: string]: unknown;
933
+ } | {
934
+ rawChannels?: number | undefined;
935
+ data: number[];
936
+ width: number;
937
+ height: number;
938
+ channels: number;
939
+ };
940
+ width: number;
941
+ height: number;
942
+ channels: number;
943
+ };
944
+ }, {
945
+ text: string | string[];
946
+ }, {
947
+ title?: string | undefined;
948
+ description?: string | undefined;
949
+ model_id?: string | undefined;
950
+ tasks?: string[] | undefined;
951
+ metadata?: {
952
+ [x: string]: unknown;
953
+ } | undefined;
954
+ provider: "HF_TRANSFORMERS_ONNX";
955
+ provider_config: {
956
+ normalize?: boolean | undefined;
957
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
958
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
959
+ execution_providers?: string[] | undefined;
960
+ intra_op_num_threads?: number | undefined;
961
+ inter_op_num_threads?: number | undefined;
962
+ use_external_data_format?: boolean | undefined;
963
+ pooling?: "mean" | "last_token" | "cls" | undefined;
964
+ language_style?: string | undefined;
965
+ mrl?: boolean | undefined;
966
+ pipeline: "feature-extraction";
967
+ model_path: string;
968
+ native_dimensions: number;
969
+ } | {
970
+ normalize?: boolean | undefined;
971
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
972
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
973
+ execution_providers?: string[] | undefined;
974
+ intra_op_num_threads?: number | undefined;
975
+ inter_op_num_threads?: number | undefined;
976
+ use_external_data_format?: boolean | undefined;
977
+ native_dimensions?: number | undefined;
978
+ pooling?: "mean" | "last_token" | "cls" | undefined;
979
+ language_style?: string | undefined;
980
+ mrl?: boolean | undefined;
981
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
982
+ model_path: string;
983
+ };
984
+ }>;
985
+ readonly BackgroundRemovalTask: AiProviderRunFn<{
986
+ model: string | {
987
+ [x: string]: unknown;
988
+ title?: string | undefined;
989
+ description?: string | undefined;
990
+ model_id?: string | undefined;
991
+ tasks?: string[] | undefined;
992
+ metadata?: {
993
+ [x: string]: unknown;
994
+ } | undefined;
995
+ provider: string;
996
+ provider_config: {
997
+ [x: string]: unknown;
998
+ };
999
+ };
1000
+ image: string | {
1001
+ data: {
1002
+ [x: string]: unknown;
1003
+ } | {
1004
+ rawChannels?: number | undefined;
1005
+ data: number[];
1006
+ width: number;
1007
+ height: number;
1008
+ channels: number;
1009
+ };
1010
+ width: number;
1011
+ height: number;
1012
+ channels: number;
1013
+ };
1014
+ }, {
1015
+ image: string;
1016
+ }, {
1017
+ title?: string | undefined;
1018
+ description?: string | undefined;
1019
+ model_id?: string | undefined;
1020
+ tasks?: string[] | undefined;
1021
+ metadata?: {
1022
+ [x: string]: unknown;
1023
+ } | undefined;
1024
+ provider: "HF_TRANSFORMERS_ONNX";
1025
+ provider_config: {
1026
+ normalize?: boolean | undefined;
1027
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
1028
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
1029
+ execution_providers?: string[] | undefined;
1030
+ intra_op_num_threads?: number | undefined;
1031
+ inter_op_num_threads?: number | undefined;
1032
+ use_external_data_format?: boolean | undefined;
1033
+ pooling?: "mean" | "last_token" | "cls" | undefined;
1034
+ language_style?: string | undefined;
1035
+ mrl?: boolean | undefined;
1036
+ pipeline: "feature-extraction";
1037
+ model_path: string;
1038
+ native_dimensions: number;
1039
+ } | {
1040
+ normalize?: boolean | undefined;
1041
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
1042
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
1043
+ execution_providers?: string[] | undefined;
1044
+ intra_op_num_threads?: number | undefined;
1045
+ inter_op_num_threads?: number | undefined;
1046
+ use_external_data_format?: boolean | undefined;
1047
+ native_dimensions?: number | undefined;
1048
+ pooling?: "mean" | "last_token" | "cls" | undefined;
1049
+ language_style?: string | undefined;
1050
+ mrl?: boolean | undefined;
1051
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
1052
+ model_path: string;
1053
+ };
1054
+ }>;
1055
+ readonly ImageEmbeddingTask: AiProviderRunFn<{
1056
+ model: string | {
1057
+ [x: string]: unknown;
1058
+ title?: string | undefined;
1059
+ description?: string | undefined;
1060
+ model_id?: string | undefined;
1061
+ tasks?: string[] | undefined;
1062
+ metadata?: {
1063
+ [x: string]: unknown;
1064
+ } | undefined;
1065
+ provider: string;
1066
+ provider_config: {
1067
+ [x: string]: unknown;
1068
+ };
1069
+ };
1070
+ image: string | {
1071
+ data: {
1072
+ [x: string]: unknown;
1073
+ } | {
1074
+ rawChannels?: number | undefined;
1075
+ data: number[];
1076
+ width: number;
1077
+ height: number;
1078
+ channels: number;
1079
+ };
1080
+ width: number;
1081
+ height: number;
1082
+ channels: number;
1083
+ };
1084
+ }, {
1085
+ vector: TypedArray;
1086
+ }, {
1087
+ title?: string | undefined;
1088
+ description?: string | undefined;
1089
+ model_id?: string | undefined;
1090
+ tasks?: string[] | undefined;
1091
+ metadata?: {
1092
+ [x: string]: unknown;
1093
+ } | undefined;
1094
+ provider: "HF_TRANSFORMERS_ONNX";
1095
+ provider_config: {
1096
+ normalize?: boolean | undefined;
1097
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
1098
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
1099
+ execution_providers?: string[] | undefined;
1100
+ intra_op_num_threads?: number | undefined;
1101
+ inter_op_num_threads?: number | undefined;
1102
+ use_external_data_format?: boolean | undefined;
1103
+ pooling?: "mean" | "last_token" | "cls" | undefined;
1104
+ language_style?: string | undefined;
1105
+ mrl?: boolean | undefined;
1106
+ pipeline: "feature-extraction";
1107
+ model_path: string;
1108
+ native_dimensions: number;
1109
+ } | {
1110
+ normalize?: boolean | undefined;
1111
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
1112
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
1113
+ execution_providers?: string[] | undefined;
1114
+ intra_op_num_threads?: number | undefined;
1115
+ inter_op_num_threads?: number | undefined;
1116
+ use_external_data_format?: boolean | undefined;
1117
+ native_dimensions?: number | undefined;
1118
+ pooling?: "mean" | "last_token" | "cls" | undefined;
1119
+ language_style?: string | undefined;
1120
+ mrl?: boolean | undefined;
1121
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
1122
+ model_path: string;
1123
+ };
1124
+ }>;
1125
+ readonly ImageClassificationTask: AiProviderRunFn<{
1126
+ maxCategories?: number | undefined;
1127
+ categories?: string[] | undefined;
1128
+ model: string | {
1129
+ [x: string]: unknown;
1130
+ title?: string | undefined;
1131
+ description?: string | undefined;
1132
+ model_id?: string | undefined;
1133
+ tasks?: string[] | undefined;
1134
+ metadata?: {
1135
+ [x: string]: unknown;
1136
+ } | undefined;
1137
+ provider: string;
1138
+ provider_config: {
1139
+ [x: string]: unknown;
1140
+ };
1141
+ };
1142
+ image: string | {
1143
+ data: {
1144
+ [x: string]: unknown;
1145
+ } | {
1146
+ rawChannels?: number | undefined;
1147
+ data: number[];
1148
+ width: number;
1149
+ height: number;
1150
+ channels: number;
1151
+ };
1152
+ width: number;
1153
+ height: number;
1154
+ channels: number;
1155
+ };
1156
+ }, {
1157
+ categories: {
1158
+ label: string;
1159
+ score: number;
1160
+ }[] | {
1161
+ label: string;
1162
+ score: number;
1163
+ }[][];
1164
+ }, {
1165
+ title?: string | undefined;
1166
+ description?: string | undefined;
1167
+ model_id?: string | undefined;
1168
+ tasks?: string[] | undefined;
1169
+ metadata?: {
1170
+ [x: string]: unknown;
1171
+ } | undefined;
1172
+ provider: "HF_TRANSFORMERS_ONNX";
1173
+ provider_config: {
1174
+ normalize?: boolean | undefined;
1175
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
1176
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
1177
+ execution_providers?: string[] | undefined;
1178
+ intra_op_num_threads?: number | undefined;
1179
+ inter_op_num_threads?: number | undefined;
1180
+ use_external_data_format?: boolean | undefined;
1181
+ pooling?: "mean" | "last_token" | "cls" | undefined;
1182
+ language_style?: string | undefined;
1183
+ mrl?: boolean | undefined;
1184
+ pipeline: "feature-extraction";
1185
+ model_path: string;
1186
+ native_dimensions: number;
1187
+ } | {
1188
+ normalize?: boolean | undefined;
1189
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
1190
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
1191
+ execution_providers?: string[] | undefined;
1192
+ intra_op_num_threads?: number | undefined;
1193
+ inter_op_num_threads?: number | undefined;
1194
+ use_external_data_format?: boolean | undefined;
1195
+ native_dimensions?: number | undefined;
1196
+ pooling?: "mean" | "last_token" | "cls" | undefined;
1197
+ language_style?: string | undefined;
1198
+ mrl?: boolean | undefined;
1199
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
1200
+ model_path: string;
1201
+ };
1202
+ }>;
1203
+ readonly ObjectDetectionTask: AiProviderRunFn<{
1204
+ threshold?: number | undefined;
1205
+ labels?: string[] | undefined;
1206
+ model: string | {
1207
+ [x: string]: unknown;
1208
+ title?: string | undefined;
1209
+ description?: string | undefined;
1210
+ model_id?: string | undefined;
1211
+ tasks?: string[] | undefined;
1212
+ metadata?: {
1213
+ [x: string]: unknown;
1214
+ } | undefined;
1215
+ provider: string;
1216
+ provider_config: {
1217
+ [x: string]: unknown;
1218
+ };
1219
+ };
1220
+ image: string | {
1221
+ data: {
1222
+ [x: string]: unknown;
1223
+ } | {
1224
+ rawChannels?: number | undefined;
1225
+ data: number[];
1226
+ width: number;
1227
+ height: number;
1228
+ channels: number;
1229
+ };
1230
+ width: number;
1231
+ height: number;
1232
+ channels: number;
1233
+ };
1234
+ }, {
1235
+ detections: {
1236
+ label: string;
1237
+ score: number;
1238
+ box: {
1239
+ width: number;
1240
+ height: number;
1241
+ x: number;
1242
+ y: number;
1243
+ };
1244
+ }[] | {
1245
+ label: string;
1246
+ score: number;
1247
+ box: {
1248
+ width: number;
1249
+ height: number;
1250
+ x: number;
1251
+ y: number;
1252
+ };
1253
+ }[][];
1254
+ }, {
1255
+ title?: string | undefined;
1256
+ description?: string | undefined;
1257
+ model_id?: string | undefined;
1258
+ tasks?: string[] | undefined;
1259
+ metadata?: {
1260
+ [x: string]: unknown;
1261
+ } | undefined;
1262
+ provider: "HF_TRANSFORMERS_ONNX";
1263
+ provider_config: {
1264
+ normalize?: boolean | undefined;
1265
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
1266
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
1267
+ execution_providers?: string[] | undefined;
1268
+ intra_op_num_threads?: number | undefined;
1269
+ inter_op_num_threads?: number | undefined;
1270
+ use_external_data_format?: boolean | undefined;
1271
+ pooling?: "mean" | "last_token" | "cls" | undefined;
1272
+ language_style?: string | undefined;
1273
+ mrl?: boolean | undefined;
1274
+ pipeline: "feature-extraction";
1275
+ model_path: string;
1276
+ native_dimensions: number;
1277
+ } | {
1278
+ normalize?: boolean | undefined;
1279
+ dtype?: "auto" | "fp32" | "fp16" | "q8" | "int8" | "uint8" | "q4" | "bnb4" | "q4f16" | undefined;
1280
+ device?: "cpu" | "gpu" | "webgpu" | "wasm" | "metal" | undefined;
1281
+ execution_providers?: string[] | undefined;
1282
+ intra_op_num_threads?: number | undefined;
1283
+ inter_op_num_threads?: number | undefined;
1284
+ use_external_data_format?: boolean | undefined;
1285
+ native_dimensions?: number | undefined;
1286
+ pooling?: "mean" | "last_token" | "cls" | undefined;
1287
+ language_style?: string | undefined;
1288
+ mrl?: boolean | undefined;
1289
+ pipeline: "fill-mask" | "token-classification" | "text-generation" | "text2text-generation" | "text-classification" | "summarization" | "translation" | "zero-shot-classification" | "question-answering" | "background-removal" | "image-segmentation" | "depth-estimation" | "image-classification" | "image-to-image" | "object-detection" | "image-feature-extraction" | "audio-classification" | "automatic-speech-recognition" | "text-to-speech" | "document-question-answering" | "image-to-text" | "zero-shot-audio-classification" | "zero-shot-image-classification" | "zero-shot-object-detection";
1290
+ model_path: string;
1291
+ };
1292
+ }>;
1293
+ };
1294
+ /**
1295
+ * Streaming variants of HuggingFace Transformers task run functions.
1296
+ * Pass this as the second argument to `new HuggingFaceTransformersProvider(HFT_TASKS, HFT_STREAM_TASKS)`.
1297
+ */
1298
+ export declare const HFT_STREAM_TASKS: Record<string, AiProviderStreamFn<any, any, HfTransformersOnnxModelConfig>>;
82
1299
  //# sourceMappingURL=HFT_JobRunFns.d.ts.map