@huggingface/tasks 0.13.4 → 0.13.6
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/commonjs/hardware.d.ts +12 -0
- package/dist/commonjs/hardware.d.ts.map +1 -1
- package/dist/commonjs/hardware.js +15 -3
- package/dist/commonjs/local-apps.d.ts.map +1 -1
- package/dist/commonjs/local-apps.js +40 -21
- package/dist/commonjs/local-apps.spec.d.ts +2 -0
- package/dist/commonjs/local-apps.spec.d.ts.map +1 -0
- package/dist/commonjs/local-apps.spec.js +114 -0
- package/dist/commonjs/model-libraries-snippets.d.ts.map +1 -1
- package/dist/commonjs/model-libraries-snippets.js +23 -12
- package/dist/commonjs/model-libraries-snippets.spec.d.ts +2 -0
- package/dist/commonjs/model-libraries-snippets.spec.d.ts.map +1 -0
- package/dist/commonjs/model-libraries-snippets.spec.js +51 -0
- package/dist/commonjs/snippets/curl.js +4 -4
- package/dist/commonjs/snippets/js.js +5 -5
- package/dist/commonjs/tasks/audio-classification/inference.d.ts +4 -3
- package/dist/commonjs/tasks/audio-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/automatic-speech-recognition/inference.d.ts +1 -5
- package/dist/commonjs/tasks/automatic-speech-recognition/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/chat-completion/inference.d.ts +18 -6
- package/dist/commonjs/tasks/chat-completion/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/depth-estimation/inference.d.ts +1 -1
- package/dist/commonjs/tasks/document-question-answering/inference.d.ts +1 -3
- package/dist/commonjs/tasks/document-question-answering/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/feature-extraction/inference.d.ts +1 -1
- package/dist/commonjs/tasks/fill-mask/inference.d.ts +1 -3
- package/dist/commonjs/tasks/fill-mask/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/image-classification/inference.d.ts +4 -3
- package/dist/commonjs/tasks/image-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/image-segmentation/inference.d.ts +1 -3
- package/dist/commonjs/tasks/image-segmentation/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/image-to-image/inference.d.ts +1 -3
- package/dist/commonjs/tasks/image-to-image/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/image-to-text/inference.d.ts +1 -5
- package/dist/commonjs/tasks/image-to-text/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/object-detection/inference.d.ts +1 -3
- package/dist/commonjs/tasks/object-detection/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/question-answering/inference.d.ts +1 -3
- package/dist/commonjs/tasks/question-answering/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/sentence-similarity/inference.d.ts +1 -1
- package/dist/commonjs/tasks/summarization/inference.d.ts +1 -3
- package/dist/commonjs/tasks/summarization/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/table-question-answering/inference.d.ts +1 -1
- package/dist/commonjs/tasks/text-classification/inference.d.ts +4 -3
- package/dist/commonjs/tasks/text-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text-to-audio/inference.d.ts +1 -5
- package/dist/commonjs/tasks/text-to-audio/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text-to-image/inference.d.ts +1 -3
- package/dist/commonjs/tasks/text-to-image/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text-to-speech/inference.d.ts +1 -5
- package/dist/commonjs/tasks/text-to-speech/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/text2text-generation/inference.d.ts +1 -3
- package/dist/commonjs/tasks/text2text-generation/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/token-classification/inference.d.ts +1 -3
- package/dist/commonjs/tasks/token-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/translation/inference.d.ts +1 -3
- package/dist/commonjs/tasks/translation/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/video-classification/inference.d.ts +4 -3
- package/dist/commonjs/tasks/video-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/visual-question-answering/inference.d.ts +1 -3
- package/dist/commonjs/tasks/visual-question-answering/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/zero-shot-classification/inference.d.ts +1 -3
- package/dist/commonjs/tasks/zero-shot-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/zero-shot-image-classification/inference.d.ts +1 -3
- package/dist/commonjs/tasks/zero-shot-image-classification/inference.d.ts.map +1 -1
- package/dist/commonjs/tasks/zero-shot-object-detection/inference.d.ts +1 -3
- package/dist/commonjs/tasks/zero-shot-object-detection/inference.d.ts.map +1 -1
- package/dist/esm/hardware.d.ts +12 -0
- package/dist/esm/hardware.d.ts.map +1 -1
- package/dist/esm/hardware.js +15 -3
- package/dist/esm/local-apps.d.ts.map +1 -1
- package/dist/esm/local-apps.js +40 -21
- package/dist/esm/local-apps.spec.d.ts +2 -0
- package/dist/esm/local-apps.spec.d.ts.map +1 -0
- package/dist/esm/local-apps.spec.js +112 -0
- package/dist/esm/model-libraries-snippets.d.ts.map +1 -1
- package/dist/esm/model-libraries-snippets.js +23 -12
- package/dist/esm/model-libraries-snippets.spec.d.ts +2 -0
- package/dist/esm/model-libraries-snippets.spec.d.ts.map +1 -0
- package/dist/esm/model-libraries-snippets.spec.js +49 -0
- package/dist/esm/snippets/curl.js +4 -4
- package/dist/esm/snippets/js.js +5 -5
- package/dist/esm/tasks/audio-classification/inference.d.ts +4 -3
- package/dist/esm/tasks/audio-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/automatic-speech-recognition/inference.d.ts +1 -5
- package/dist/esm/tasks/automatic-speech-recognition/inference.d.ts.map +1 -1
- package/dist/esm/tasks/chat-completion/inference.d.ts +18 -6
- package/dist/esm/tasks/chat-completion/inference.d.ts.map +1 -1
- package/dist/esm/tasks/depth-estimation/inference.d.ts +1 -1
- package/dist/esm/tasks/document-question-answering/inference.d.ts +1 -3
- package/dist/esm/tasks/document-question-answering/inference.d.ts.map +1 -1
- package/dist/esm/tasks/feature-extraction/inference.d.ts +1 -1
- package/dist/esm/tasks/fill-mask/inference.d.ts +1 -3
- package/dist/esm/tasks/fill-mask/inference.d.ts.map +1 -1
- package/dist/esm/tasks/image-classification/inference.d.ts +4 -3
- package/dist/esm/tasks/image-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/image-segmentation/inference.d.ts +1 -3
- package/dist/esm/tasks/image-segmentation/inference.d.ts.map +1 -1
- package/dist/esm/tasks/image-to-image/inference.d.ts +1 -3
- package/dist/esm/tasks/image-to-image/inference.d.ts.map +1 -1
- package/dist/esm/tasks/image-to-text/inference.d.ts +1 -5
- package/dist/esm/tasks/image-to-text/inference.d.ts.map +1 -1
- package/dist/esm/tasks/object-detection/inference.d.ts +1 -3
- package/dist/esm/tasks/object-detection/inference.d.ts.map +1 -1
- package/dist/esm/tasks/question-answering/inference.d.ts +1 -3
- package/dist/esm/tasks/question-answering/inference.d.ts.map +1 -1
- package/dist/esm/tasks/sentence-similarity/inference.d.ts +1 -1
- package/dist/esm/tasks/summarization/inference.d.ts +1 -3
- package/dist/esm/tasks/summarization/inference.d.ts.map +1 -1
- package/dist/esm/tasks/table-question-answering/inference.d.ts +1 -1
- package/dist/esm/tasks/text-classification/inference.d.ts +4 -3
- package/dist/esm/tasks/text-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text-to-audio/inference.d.ts +1 -5
- package/dist/esm/tasks/text-to-audio/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text-to-image/inference.d.ts +1 -3
- package/dist/esm/tasks/text-to-image/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text-to-speech/inference.d.ts +1 -5
- package/dist/esm/tasks/text-to-speech/inference.d.ts.map +1 -1
- package/dist/esm/tasks/text2text-generation/inference.d.ts +1 -3
- package/dist/esm/tasks/text2text-generation/inference.d.ts.map +1 -1
- package/dist/esm/tasks/token-classification/inference.d.ts +1 -3
- package/dist/esm/tasks/token-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/translation/inference.d.ts +1 -3
- package/dist/esm/tasks/translation/inference.d.ts.map +1 -1
- package/dist/esm/tasks/video-classification/inference.d.ts +4 -3
- package/dist/esm/tasks/video-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/visual-question-answering/inference.d.ts +1 -3
- package/dist/esm/tasks/visual-question-answering/inference.d.ts.map +1 -1
- package/dist/esm/tasks/zero-shot-classification/inference.d.ts +1 -3
- package/dist/esm/tasks/zero-shot-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/zero-shot-image-classification/inference.d.ts +1 -3
- package/dist/esm/tasks/zero-shot-image-classification/inference.d.ts.map +1 -1
- package/dist/esm/tasks/zero-shot-object-detection/inference.d.ts +1 -3
- package/dist/esm/tasks/zero-shot-object-detection/inference.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/hardware.ts +15 -3
- package/src/local-apps.spec.ts +123 -0
- package/src/local-apps.ts +37 -18
- package/src/model-libraries-snippets.spec.ts +54 -0
- package/src/model-libraries-snippets.ts +24 -11
- package/src/snippets/curl.ts +4 -4
- package/src/snippets/js.ts +5 -5
- package/src/tasks/audio-classification/inference.ts +4 -3
- package/src/tasks/audio-classification/spec/input.json +3 -3
- package/src/tasks/automatic-speech-recognition/inference.ts +1 -5
- package/src/tasks/automatic-speech-recognition/spec/input.json +1 -2
- package/src/tasks/chat-completion/inference.ts +19 -6
- package/src/tasks/chat-completion/spec/input.json +14 -19
- package/src/tasks/common-definitions.json +0 -1
- package/src/tasks/depth-estimation/inference.ts +1 -1
- package/src/tasks/depth-estimation/spec/input.json +1 -2
- package/src/tasks/document-question-answering/inference.ts +1 -3
- package/src/tasks/document-question-answering/spec/input.json +1 -2
- package/src/tasks/feature-extraction/inference.ts +1 -1
- package/src/tasks/feature-extraction/spec/input.json +1 -1
- package/src/tasks/fill-mask/inference.ts +1 -3
- package/src/tasks/fill-mask/spec/input.json +1 -2
- package/src/tasks/image-classification/inference.ts +4 -3
- package/src/tasks/image-classification/spec/input.json +3 -3
- package/src/tasks/image-segmentation/inference.ts +1 -3
- package/src/tasks/image-segmentation/spec/input.json +1 -2
- package/src/tasks/image-to-image/inference.ts +1 -3
- package/src/tasks/image-to-image/spec/input.json +1 -2
- package/src/tasks/image-to-text/inference.ts +1 -5
- package/src/tasks/image-to-text/spec/input.json +1 -2
- package/src/tasks/object-detection/inference.ts +1 -3
- package/src/tasks/object-detection/spec/input.json +1 -2
- package/src/tasks/placeholder/spec/input.json +1 -2
- package/src/tasks/question-answering/inference.ts +1 -3
- package/src/tasks/question-answering/spec/input.json +1 -2
- package/src/tasks/sentence-similarity/inference.ts +1 -1
- package/src/tasks/sentence-similarity/spec/input.json +1 -2
- package/src/tasks/summarization/inference.ts +1 -3
- package/src/tasks/summarization/spec/input.json +1 -2
- package/src/tasks/table-question-answering/inference.ts +1 -1
- package/src/tasks/table-question-answering/spec/input.json +1 -2
- package/src/tasks/text-classification/inference.ts +4 -3
- package/src/tasks/text-classification/spec/input.json +3 -3
- package/src/tasks/text-to-audio/inference.ts +1 -5
- package/src/tasks/text-to-audio/spec/input.json +1 -2
- package/src/tasks/text-to-image/inference.ts +1 -3
- package/src/tasks/text-to-image/spec/input.json +1 -2
- package/src/tasks/text-to-speech/inference.ts +1 -5
- package/src/tasks/text-to-speech/spec/input.json +1 -2
- package/src/tasks/text2text-generation/inference.ts +1 -3
- package/src/tasks/text2text-generation/spec/input.json +1 -2
- package/src/tasks/token-classification/inference.ts +1 -3
- package/src/tasks/token-classification/spec/input.json +1 -2
- package/src/tasks/translation/inference.ts +1 -3
- package/src/tasks/translation/spec/input.json +1 -2
- package/src/tasks/video-classification/inference.ts +4 -3
- package/src/tasks/video-classification/spec/input.json +3 -3
- package/src/tasks/visual-question-answering/inference.ts +1 -3
- package/src/tasks/visual-question-answering/spec/input.json +1 -2
- package/src/tasks/zero-shot-classification/inference.ts +1 -3
- package/src/tasks/zero-shot-classification/spec/input.json +1 -2
- package/src/tasks/zero-shot-image-classification/inference.ts +1 -3
- package/src/tasks/zero-shot-image-classification/spec/input.json +1 -2
- package/src/tasks/zero-shot-object-detection/inference.ts +1 -3
- package/src/tasks/zero-shot-object-detection/spec/input.json +1 -2
- package/dist/commonjs/snippets/curl.spec.d.ts +0 -2
- package/dist/commonjs/snippets/curl.spec.d.ts.map +0 -1
- package/dist/commonjs/snippets/curl.spec.js +0 -89
- package/dist/commonjs/snippets/js.spec.d.ts +0 -2
- package/dist/commonjs/snippets/js.spec.d.ts.map +0 -1
- package/dist/commonjs/snippets/js.spec.js +0 -141
- package/dist/commonjs/snippets/python.spec.d.ts +0 -2
- package/dist/commonjs/snippets/python.spec.d.ts.map +0 -1
- package/dist/commonjs/snippets/python.spec.js +0 -135
- package/dist/esm/snippets/curl.spec.d.ts +0 -2
- package/dist/esm/snippets/curl.spec.d.ts.map +0 -1
- package/dist/esm/snippets/curl.spec.js +0 -87
- package/dist/esm/snippets/js.spec.d.ts +0 -2
- package/dist/esm/snippets/js.spec.d.ts.map +0 -1
- package/dist/esm/snippets/js.spec.js +0 -139
- package/dist/esm/snippets/python.spec.d.ts +0 -2
- package/dist/esm/snippets/python.spec.d.ts.map +0 -1
- package/dist/esm/snippets/python.spec.js +0 -133
- package/src/snippets/curl.spec.ts +0 -94
- package/src/snippets/js.spec.ts +0 -148
- package/src/snippets/python.spec.ts +0 -144
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
"$ref": "#/$defs/ChatCompletionInputToolChoice"
|
|
115
115
|
}
|
|
116
116
|
],
|
|
117
|
+
"default": "auto",
|
|
117
118
|
"nullable": true
|
|
118
119
|
},
|
|
119
120
|
"tool_prompt": {
|
|
@@ -272,23 +273,21 @@
|
|
|
272
273
|
"title": "ChatCompletionInputStreamOptions"
|
|
273
274
|
},
|
|
274
275
|
"ChatCompletionInputToolChoice": {
|
|
275
|
-
"allOf": [
|
|
276
|
-
{
|
|
277
|
-
"$ref": "#/$defs/ChatCompletionInputToolType"
|
|
278
|
-
}
|
|
279
|
-
],
|
|
280
|
-
"nullable": true,
|
|
281
|
-
"title": "ChatCompletionInputToolChoice"
|
|
282
|
-
},
|
|
283
|
-
"ChatCompletionInputToolType": {
|
|
284
276
|
"oneOf": [
|
|
285
277
|
{
|
|
286
|
-
"type": "
|
|
287
|
-
"
|
|
288
|
-
"
|
|
278
|
+
"type": "string",
|
|
279
|
+
"description": "Means the model can pick between generating a message or calling one or more tools.",
|
|
280
|
+
"enum": ["auto"]
|
|
289
281
|
},
|
|
290
282
|
{
|
|
291
|
-
"type": "string"
|
|
283
|
+
"type": "string",
|
|
284
|
+
"description": "Means the model will not call any tool and instead generates a message.",
|
|
285
|
+
"enum": ["none"]
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"type": "string",
|
|
289
|
+
"description": "Means the model must call one or more tools.",
|
|
290
|
+
"enum": ["required"]
|
|
292
291
|
},
|
|
293
292
|
{
|
|
294
293
|
"type": "object",
|
|
@@ -298,14 +297,10 @@
|
|
|
298
297
|
"$ref": "#/$defs/ChatCompletionInputFunctionName"
|
|
299
298
|
}
|
|
300
299
|
}
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
"type": "object",
|
|
304
|
-
"default": null,
|
|
305
|
-
"nullable": true
|
|
306
300
|
}
|
|
307
301
|
],
|
|
308
|
-
"
|
|
302
|
+
"description": "<https://platform.openai.com/docs/guides/function-calling/configuring-function-calling-behavior-using-the-tool_choice-parameter>",
|
|
303
|
+
"title": "ChatCompletionInputToolChoice"
|
|
309
304
|
},
|
|
310
305
|
"ChatCompletionInputFunctionName": {
|
|
311
306
|
"type": "object",
|
|
@@ -9,14 +9,13 @@
|
|
|
9
9
|
"description": "The input image data"
|
|
10
10
|
},
|
|
11
11
|
"parameters": {
|
|
12
|
-
"description": "Additional inference parameters",
|
|
12
|
+
"description": "Additional inference parameters for Depth Estimation",
|
|
13
13
|
"$ref": "#/$defs/DepthEstimationParameters"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"$defs": {
|
|
17
17
|
"DepthEstimationParameters": {
|
|
18
18
|
"title": "DepthEstimationParameters",
|
|
19
|
-
"description": "Additional inference parameters for Depth Estimation",
|
|
20
19
|
"type": "object",
|
|
21
20
|
"properties": {}
|
|
22
21
|
}
|
|
@@ -12,7 +12,7 @@ export interface DocumentQuestionAnsweringInput {
|
|
|
12
12
|
*/
|
|
13
13
|
inputs: DocumentQuestionAnsweringInputData;
|
|
14
14
|
/**
|
|
15
|
-
* Additional inference parameters
|
|
15
|
+
* Additional inference parameters for Document Question Answering
|
|
16
16
|
*/
|
|
17
17
|
parameters?: DocumentQuestionAnsweringParameters;
|
|
18
18
|
[property: string]: unknown;
|
|
@@ -32,8 +32,6 @@ export interface DocumentQuestionAnsweringInputData {
|
|
|
32
32
|
[property: string]: unknown;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* Additional inference parameters
|
|
36
|
-
*
|
|
37
35
|
* Additional inference parameters for Document Question Answering
|
|
38
36
|
*/
|
|
39
37
|
export interface DocumentQuestionAnsweringParameters {
|
|
@@ -21,14 +21,13 @@
|
|
|
21
21
|
"required": ["image", "question"]
|
|
22
22
|
},
|
|
23
23
|
"parameters": {
|
|
24
|
-
"description": "Additional inference parameters",
|
|
24
|
+
"description": "Additional inference parameters for Document Question Answering",
|
|
25
25
|
"$ref": "#/$defs/DocumentQuestionAnsweringParameters"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"$defs": {
|
|
29
29
|
"DocumentQuestionAnsweringParameters": {
|
|
30
30
|
"title": "DocumentQuestionAnsweringParameters",
|
|
31
|
-
"description": "Additional inference parameters for Document Question Answering",
|
|
32
31
|
"type": "object",
|
|
33
32
|
"properties": {
|
|
34
33
|
"doc_stride": {
|
|
@@ -23,7 +23,7 @@ export interface FeatureExtractionInput {
|
|
|
23
23
|
* The name of the prompt that should be used by for encoding. If not set, no prompt
|
|
24
24
|
* will be applied.
|
|
25
25
|
*
|
|
26
|
-
* Must be a key in the `
|
|
26
|
+
* Must be a key in the `sentence-transformers` configuration `prompts` dictionary.
|
|
27
27
|
*
|
|
28
28
|
* For example if ``prompt_name`` is "query" and the ``prompts`` is {"query": "query: ",
|
|
29
29
|
* ...},
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"prompt_name": {
|
|
19
19
|
"type": "string",
|
|
20
|
-
"description": "The name of the prompt that should be used by for encoding. If not set, no prompt\nwill be applied.\n\nMust be a key in the `
|
|
20
|
+
"description": "The name of the prompt that should be used by for encoding. If not set, no prompt\nwill be applied.\n\nMust be a key in the `sentence-transformers` configuration `prompts` dictionary.\n\nFor example if ``prompt_name`` is \"query\" and the ``prompts`` is {\"query\": \"query: \", ...},\nthen the sentence \"What is the capital of France?\" will be encoded as\n\"query: What is the capital of France?\" because the prompt text will be prepended before\nany text to encode.",
|
|
21
21
|
"default": "null",
|
|
22
22
|
"example": "null",
|
|
23
23
|
"nullable": true
|
|
@@ -12,14 +12,12 @@ export interface FillMaskInput {
|
|
|
12
12
|
*/
|
|
13
13
|
inputs: string;
|
|
14
14
|
/**
|
|
15
|
-
* Additional inference parameters
|
|
15
|
+
* Additional inference parameters for Fill Mask
|
|
16
16
|
*/
|
|
17
17
|
parameters?: FillMaskParameters;
|
|
18
18
|
[property: string]: unknown;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Additional inference parameters
|
|
22
|
-
*
|
|
23
21
|
* Additional inference parameters for Fill Mask
|
|
24
22
|
*/
|
|
25
23
|
export interface FillMaskParameters {
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"type": "string"
|
|
11
11
|
},
|
|
12
12
|
"parameters": {
|
|
13
|
-
"description": "Additional inference parameters",
|
|
13
|
+
"description": "Additional inference parameters for Fill Mask",
|
|
14
14
|
"$ref": "#/$defs/FillMaskParameters"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"$defs": {
|
|
18
18
|
"FillMaskParameters": {
|
|
19
19
|
"title": "FillMaskParameters",
|
|
20
|
-
"description": "Additional inference parameters for Fill Mask",
|
|
21
20
|
"type": "object",
|
|
22
21
|
"properties": {
|
|
23
22
|
"top_k": {
|
|
@@ -13,17 +13,18 @@ export interface ImageClassificationInput {
|
|
|
13
13
|
*/
|
|
14
14
|
inputs: string;
|
|
15
15
|
/**
|
|
16
|
-
* Additional inference parameters
|
|
16
|
+
* Additional inference parameters for Image Classification
|
|
17
17
|
*/
|
|
18
18
|
parameters?: ImageClassificationParameters;
|
|
19
19
|
[property: string]: unknown;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Additional inference parameters
|
|
23
|
-
*
|
|
24
22
|
* Additional inference parameters for Image Classification
|
|
25
23
|
*/
|
|
26
24
|
export interface ImageClassificationParameters {
|
|
25
|
+
/**
|
|
26
|
+
* The function to apply to the model outputs in order to retrieve the scores.
|
|
27
|
+
*/
|
|
27
28
|
function_to_apply?: ClassificationOutputTransform;
|
|
28
29
|
/**
|
|
29
30
|
* When specified, limits the output to the top K most probable classes.
|
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
"description": "The input image data as a base64-encoded string. If no `parameters` are provided, you can also provide the image data as a raw bytes payload."
|
|
11
11
|
},
|
|
12
12
|
"parameters": {
|
|
13
|
-
"description": "Additional inference parameters",
|
|
13
|
+
"description": "Additional inference parameters for Image Classification",
|
|
14
14
|
"$ref": "#/$defs/ImageClassificationParameters"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"$defs": {
|
|
18
18
|
"ImageClassificationParameters": {
|
|
19
19
|
"title": "ImageClassificationParameters",
|
|
20
|
-
"description": "Additional inference parameters for Image Classification",
|
|
21
20
|
"type": "object",
|
|
22
21
|
"properties": {
|
|
23
22
|
"function_to_apply": {
|
|
24
23
|
"title": "ImageClassificationOutputTransform",
|
|
25
|
-
"$ref": "/inference/schemas/common-definitions.json#/definitions/ClassificationOutputTransform"
|
|
24
|
+
"$ref": "/inference/schemas/common-definitions.json#/definitions/ClassificationOutputTransform",
|
|
25
|
+
"description": "The function to apply to the model outputs in order to retrieve the scores."
|
|
26
26
|
},
|
|
27
27
|
"top_k": {
|
|
28
28
|
"type": "integer",
|
|
@@ -13,14 +13,12 @@ export interface ImageSegmentationInput {
|
|
|
13
13
|
*/
|
|
14
14
|
inputs: string;
|
|
15
15
|
/**
|
|
16
|
-
* Additional inference parameters
|
|
16
|
+
* Additional inference parameters for Image Segmentation
|
|
17
17
|
*/
|
|
18
18
|
parameters?: ImageSegmentationParameters;
|
|
19
19
|
[property: string]: unknown;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Additional inference parameters
|
|
23
|
-
*
|
|
24
22
|
* Additional inference parameters for Image Segmentation
|
|
25
23
|
*/
|
|
26
24
|
export interface ImageSegmentationParameters {
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"description": "The input image data as a base64-encoded string. If no `parameters` are provided, you can also provide the image data as a raw bytes payload."
|
|
11
11
|
},
|
|
12
12
|
"parameters": {
|
|
13
|
-
"description": "Additional inference parameters",
|
|
13
|
+
"description": "Additional inference parameters for Image Segmentation",
|
|
14
14
|
"$ref": "#/$defs/ImageSegmentationParameters"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"$defs": {
|
|
18
18
|
"ImageSegmentationParameters": {
|
|
19
19
|
"title": "ImageSegmentationParameters",
|
|
20
|
-
"description": "Additional inference parameters for Image Segmentation",
|
|
21
20
|
"type": "object",
|
|
22
21
|
"properties": {
|
|
23
22
|
"mask_threshold": {
|
|
@@ -14,15 +14,13 @@ export interface ImageToImageInput {
|
|
|
14
14
|
*/
|
|
15
15
|
inputs: string;
|
|
16
16
|
/**
|
|
17
|
-
* Additional inference parameters
|
|
17
|
+
* Additional inference parameters for Image To Image
|
|
18
18
|
*/
|
|
19
19
|
parameters?: ImageToImageParameters;
|
|
20
20
|
[property: string]: unknown;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* Additional inference parameters
|
|
25
|
-
*
|
|
26
24
|
* Additional inference parameters for Image To Image
|
|
27
25
|
*/
|
|
28
26
|
export interface ImageToImageParameters {
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"description": "The input image data as a base64-encoded string. If no `parameters` are provided, you can also provide the image data as a raw bytes payload."
|
|
11
11
|
},
|
|
12
12
|
"parameters": {
|
|
13
|
-
"description": "Additional inference parameters",
|
|
13
|
+
"description": "Additional inference parameters for Image To Image",
|
|
14
14
|
"$ref": "#/$defs/ImageToImageParameters"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"$defs": {
|
|
18
18
|
"ImageToImageParameters": {
|
|
19
19
|
"title": "ImageToImageParameters",
|
|
20
|
-
"description": "Additional inference parameters for Image To Image",
|
|
21
20
|
"type": "object",
|
|
22
21
|
"properties": {
|
|
23
22
|
"guidance_scale": {
|
|
@@ -13,15 +13,13 @@ export interface ImageToTextInput {
|
|
|
13
13
|
*/
|
|
14
14
|
inputs: unknown;
|
|
15
15
|
/**
|
|
16
|
-
* Additional inference parameters
|
|
16
|
+
* Additional inference parameters for Image To Text
|
|
17
17
|
*/
|
|
18
18
|
parameters?: ImageToTextParameters;
|
|
19
19
|
[property: string]: unknown;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Additional inference parameters
|
|
24
|
-
*
|
|
25
23
|
* Additional inference parameters for Image To Text
|
|
26
24
|
*/
|
|
27
25
|
export interface ImageToTextParameters {
|
|
@@ -38,8 +36,6 @@ export interface ImageToTextParameters {
|
|
|
38
36
|
|
|
39
37
|
/**
|
|
40
38
|
* Parametrization of the text generation process
|
|
41
|
-
*
|
|
42
|
-
* Ad-hoc parametrization of the text generation process
|
|
43
39
|
*/
|
|
44
40
|
export interface GenerationParameters {
|
|
45
41
|
/**
|
|
@@ -9,14 +9,13 @@
|
|
|
9
9
|
"description": "The input image data"
|
|
10
10
|
},
|
|
11
11
|
"parameters": {
|
|
12
|
-
"description": "Additional inference parameters",
|
|
12
|
+
"description": "Additional inference parameters for Image To Text",
|
|
13
13
|
"$ref": "#/$defs/ImageToTextParameters"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"$defs": {
|
|
17
17
|
"ImageToTextParameters": {
|
|
18
18
|
"title": "ImageToTextParameters",
|
|
19
|
-
"description": "Additional inference parameters for Image To Text",
|
|
20
19
|
"type": "object",
|
|
21
20
|
"properties": {
|
|
22
21
|
"max_new_tokens": {
|
|
@@ -13,14 +13,12 @@ export interface ObjectDetectionInput {
|
|
|
13
13
|
*/
|
|
14
14
|
inputs: string;
|
|
15
15
|
/**
|
|
16
|
-
* Additional inference parameters
|
|
16
|
+
* Additional inference parameters for Object Detection
|
|
17
17
|
*/
|
|
18
18
|
parameters?: ObjectDetectionParameters;
|
|
19
19
|
[property: string]: unknown;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Additional inference parameters
|
|
23
|
-
*
|
|
24
22
|
* Additional inference parameters for Object Detection
|
|
25
23
|
*/
|
|
26
24
|
export interface ObjectDetectionParameters {
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"description": "The input image data as a base64-encoded string. If no `parameters` are provided, you can also provide the image data as a raw bytes payload."
|
|
11
11
|
},
|
|
12
12
|
"parameters": {
|
|
13
|
-
"description": "Additional inference parameters",
|
|
13
|
+
"description": "Additional inference parameters for Object Detection",
|
|
14
14
|
"$ref": "#/$defs/ObjectDetectionParameters"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"$defs": {
|
|
18
18
|
"ObjectDetectionParameters": {
|
|
19
19
|
"title": "ObjectDetectionParameters",
|
|
20
|
-
"description": "Additional inference parameters for Object Detection",
|
|
21
20
|
"type": "object",
|
|
22
21
|
"properties": {
|
|
23
22
|
"threshold": {
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"type": "string"
|
|
11
11
|
},
|
|
12
12
|
"parameters": {
|
|
13
|
-
"description": "
|
|
13
|
+
"description": "TODO: describe additional parameters here.",
|
|
14
14
|
"$ref": "#/$defs/<TASK_ID>Parameters"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"$defs": {
|
|
18
18
|
"<TASK_ID>Parameters": {
|
|
19
19
|
"title": "<TASK_ID>Parameters",
|
|
20
|
-
"description": "TODO: describe additional parameters here.",
|
|
21
20
|
"type": "object",
|
|
22
21
|
"properties": {
|
|
23
22
|
"dummy_parameter_name": {
|
|
@@ -12,7 +12,7 @@ export interface QuestionAnsweringInput {
|
|
|
12
12
|
*/
|
|
13
13
|
inputs: QuestionAnsweringInputData;
|
|
14
14
|
/**
|
|
15
|
-
* Additional inference parameters
|
|
15
|
+
* Additional inference parameters for Question Answering
|
|
16
16
|
*/
|
|
17
17
|
parameters?: QuestionAnsweringParameters;
|
|
18
18
|
[property: string]: unknown;
|
|
@@ -32,8 +32,6 @@ export interface QuestionAnsweringInputData {
|
|
|
32
32
|
[property: string]: unknown;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* Additional inference parameters
|
|
36
|
-
*
|
|
37
35
|
* Additional inference parameters for Question Answering
|
|
38
36
|
*/
|
|
39
37
|
export interface QuestionAnsweringParameters {
|
|
@@ -22,14 +22,13 @@
|
|
|
22
22
|
"required": ["question", "context"]
|
|
23
23
|
},
|
|
24
24
|
"parameters": {
|
|
25
|
-
"description": "Additional inference parameters",
|
|
25
|
+
"description": "Additional inference parameters for Question Answering",
|
|
26
26
|
"$ref": "#/$defs/QuestionAnsweringParameters"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"$defs": {
|
|
30
30
|
"QuestionAnsweringParameters": {
|
|
31
31
|
"title": "QuestionAnsweringParameters",
|
|
32
|
-
"description": "Additional inference parameters for Question Answering",
|
|
33
32
|
"type": "object",
|
|
34
33
|
"properties": {
|
|
35
34
|
"top_k": {
|
|
@@ -12,7 +12,7 @@ export type SentenceSimilarityOutput = number[];
|
|
|
12
12
|
export interface SentenceSimilarityInput {
|
|
13
13
|
inputs: SentenceSimilarityInputData;
|
|
14
14
|
/**
|
|
15
|
-
* Additional inference parameters
|
|
15
|
+
* Additional inference parameters for Sentence Similarity
|
|
16
16
|
*/
|
|
17
17
|
parameters?: { [key: string]: unknown };
|
|
18
18
|
[property: string]: unknown;
|
|
@@ -24,14 +24,13 @@
|
|
|
24
24
|
"required": ["sourceSentence", "sentences"]
|
|
25
25
|
},
|
|
26
26
|
"parameters": {
|
|
27
|
-
"description": "Additional inference parameters",
|
|
27
|
+
"description": "Additional inference parameters for Sentence Similarity",
|
|
28
28
|
"$ref": "#/$defs/SentenceSimilarityParameters"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"$defs": {
|
|
32
32
|
"SentenceSimilarityParameters": {
|
|
33
33
|
"title": "SentenceSimilarityParameters",
|
|
34
|
-
"description": "Additional inference parameters for Sentence Similarity",
|
|
35
34
|
"type": "object",
|
|
36
35
|
"properties": {}
|
|
37
36
|
}
|
|
@@ -13,15 +13,13 @@ export interface SummarizationInput {
|
|
|
13
13
|
*/
|
|
14
14
|
inputs: string;
|
|
15
15
|
/**
|
|
16
|
-
* Additional inference parameters.
|
|
16
|
+
* Additional inference parameters for summarization.
|
|
17
17
|
*/
|
|
18
18
|
parameters?: SummarizationParameters;
|
|
19
19
|
[property: string]: unknown;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Additional inference parameters.
|
|
24
|
-
*
|
|
25
23
|
* Additional inference parameters for summarization.
|
|
26
24
|
*/
|
|
27
25
|
export interface SummarizationParameters {
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"type": "string"
|
|
11
11
|
},
|
|
12
12
|
"parameters": {
|
|
13
|
-
"description": "Additional inference parameters.",
|
|
13
|
+
"description": "Additional inference parameters for summarization.",
|
|
14
14
|
"$ref": "#/$defs/SummarizationParameters"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"$defs": {
|
|
18
18
|
"SummarizationParameters": {
|
|
19
19
|
"title": "SummarizationParameters",
|
|
20
|
-
"description": "Additional inference parameters for summarization.",
|
|
21
20
|
"type": "object",
|
|
22
21
|
"properties": {
|
|
23
22
|
"clean_up_tokenization_spaces": {
|
|
@@ -28,14 +28,13 @@
|
|
|
28
28
|
"required": ["table", "question"]
|
|
29
29
|
},
|
|
30
30
|
"parameters": {
|
|
31
|
-
"description": "Additional inference parameters",
|
|
31
|
+
"description": "Additional inference parameters for Table Question Answering",
|
|
32
32
|
"$ref": "#/$defs/TableQuestionAnsweringParameters"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"$defs": {
|
|
36
36
|
"TableQuestionAnsweringParameters": {
|
|
37
37
|
"title": "TableQuestionAnsweringParameters",
|
|
38
|
-
"description": "Additional inference parameters for Table Question Answering",
|
|
39
38
|
"type": "object",
|
|
40
39
|
"properties": {}
|
|
41
40
|
}
|
|
@@ -12,17 +12,18 @@ export interface TextClassificationInput {
|
|
|
12
12
|
*/
|
|
13
13
|
inputs: string;
|
|
14
14
|
/**
|
|
15
|
-
* Additional inference parameters
|
|
15
|
+
* Additional inference parameters for Text Classification
|
|
16
16
|
*/
|
|
17
17
|
parameters?: TextClassificationParameters;
|
|
18
18
|
[property: string]: unknown;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Additional inference parameters
|
|
22
|
-
*
|
|
23
21
|
* Additional inference parameters for Text Classification
|
|
24
22
|
*/
|
|
25
23
|
export interface TextClassificationParameters {
|
|
24
|
+
/**
|
|
25
|
+
* The function to apply to the model outputs in order to retrieve the scores.
|
|
26
|
+
*/
|
|
26
27
|
function_to_apply?: ClassificationOutputTransform;
|
|
27
28
|
/**
|
|
28
29
|
* When specified, limits the output to the top K most probable classes.
|
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
"type": "string"
|
|
11
11
|
},
|
|
12
12
|
"parameters": {
|
|
13
|
-
"description": "Additional inference parameters",
|
|
13
|
+
"description": "Additional inference parameters for Text Classification",
|
|
14
14
|
"$ref": "#/$defs/TextClassificationParameters"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"$defs": {
|
|
18
18
|
"TextClassificationParameters": {
|
|
19
19
|
"title": "TextClassificationParameters",
|
|
20
|
-
"description": "Additional inference parameters for Text Classification",
|
|
21
20
|
"type": "object",
|
|
22
21
|
"properties": {
|
|
23
22
|
"function_to_apply": {
|
|
24
23
|
"title": "TextClassificationOutputTransform",
|
|
25
|
-
"$ref": "/inference/schemas/common-definitions.json#/definitions/ClassificationOutputTransform"
|
|
24
|
+
"$ref": "/inference/schemas/common-definitions.json#/definitions/ClassificationOutputTransform",
|
|
25
|
+
"description": "The function to apply to the model outputs in order to retrieve the scores."
|
|
26
26
|
},
|
|
27
27
|
"top_k": {
|
|
28
28
|
"type": "integer",
|
|
@@ -13,15 +13,13 @@ export interface TextToAudioInput {
|
|
|
13
13
|
*/
|
|
14
14
|
inputs: string;
|
|
15
15
|
/**
|
|
16
|
-
* Additional inference parameters
|
|
16
|
+
* Additional inference parameters for Text To Audio
|
|
17
17
|
*/
|
|
18
18
|
parameters?: TextToAudioParameters;
|
|
19
19
|
[property: string]: unknown;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Additional inference parameters
|
|
24
|
-
*
|
|
25
23
|
* Additional inference parameters for Text To Audio
|
|
26
24
|
*/
|
|
27
25
|
export interface TextToAudioParameters {
|
|
@@ -34,8 +32,6 @@ export interface TextToAudioParameters {
|
|
|
34
32
|
|
|
35
33
|
/**
|
|
36
34
|
* Parametrization of the text generation process
|
|
37
|
-
*
|
|
38
|
-
* Ad-hoc parametrization of the text generation process
|
|
39
35
|
*/
|
|
40
36
|
export interface GenerationParameters {
|
|
41
37
|
/**
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"type": "string"
|
|
11
11
|
},
|
|
12
12
|
"parameters": {
|
|
13
|
-
"description": "Additional inference parameters",
|
|
13
|
+
"description": "Additional inference parameters for Text To Audio",
|
|
14
14
|
"$ref": "#/$defs/TextToAudioParameters"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"$defs": {
|
|
18
18
|
"TextToAudioParameters": {
|
|
19
19
|
"title": "TextToAudioParameters",
|
|
20
|
-
"description": "Additional inference parameters for Text To Audio",
|
|
21
20
|
"type": "object",
|
|
22
21
|
"properties": {
|
|
23
22
|
"generation_parameters": {
|
|
@@ -13,15 +13,13 @@ export interface TextToImageInput {
|
|
|
13
13
|
*/
|
|
14
14
|
inputs: string;
|
|
15
15
|
/**
|
|
16
|
-
* Additional inference parameters
|
|
16
|
+
* Additional inference parameters for Text To Image
|
|
17
17
|
*/
|
|
18
18
|
parameters?: TextToImageParameters;
|
|
19
19
|
[property: string]: unknown;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Additional inference parameters
|
|
24
|
-
*
|
|
25
23
|
* Additional inference parameters for Text To Image
|
|
26
24
|
*/
|
|
27
25
|
export interface TextToImageParameters {
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"type": "string"
|
|
11
11
|
},
|
|
12
12
|
"parameters": {
|
|
13
|
-
"description": "Additional inference parameters",
|
|
13
|
+
"description": "Additional inference parameters for Text To Image",
|
|
14
14
|
"$ref": "#/$defs/TextToImageParameters"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"$defs": {
|
|
18
18
|
"TextToImageParameters": {
|
|
19
19
|
"title": "TextToImageParameters",
|
|
20
|
-
"description": "Additional inference parameters for Text To Image",
|
|
21
20
|
"type": "object",
|
|
22
21
|
"properties": {
|
|
23
22
|
"guidance_scale": {
|