@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.
Files changed (221) hide show
  1. package/dist/commonjs/hardware.d.ts +12 -0
  2. package/dist/commonjs/hardware.d.ts.map +1 -1
  3. package/dist/commonjs/hardware.js +15 -3
  4. package/dist/commonjs/local-apps.d.ts.map +1 -1
  5. package/dist/commonjs/local-apps.js +40 -21
  6. package/dist/commonjs/local-apps.spec.d.ts +2 -0
  7. package/dist/commonjs/local-apps.spec.d.ts.map +1 -0
  8. package/dist/commonjs/local-apps.spec.js +114 -0
  9. package/dist/commonjs/model-libraries-snippets.d.ts.map +1 -1
  10. package/dist/commonjs/model-libraries-snippets.js +23 -12
  11. package/dist/commonjs/model-libraries-snippets.spec.d.ts +2 -0
  12. package/dist/commonjs/model-libraries-snippets.spec.d.ts.map +1 -0
  13. package/dist/commonjs/model-libraries-snippets.spec.js +51 -0
  14. package/dist/commonjs/snippets/curl.js +4 -4
  15. package/dist/commonjs/snippets/js.js +5 -5
  16. package/dist/commonjs/tasks/audio-classification/inference.d.ts +4 -3
  17. package/dist/commonjs/tasks/audio-classification/inference.d.ts.map +1 -1
  18. package/dist/commonjs/tasks/automatic-speech-recognition/inference.d.ts +1 -5
  19. package/dist/commonjs/tasks/automatic-speech-recognition/inference.d.ts.map +1 -1
  20. package/dist/commonjs/tasks/chat-completion/inference.d.ts +18 -6
  21. package/dist/commonjs/tasks/chat-completion/inference.d.ts.map +1 -1
  22. package/dist/commonjs/tasks/depth-estimation/inference.d.ts +1 -1
  23. package/dist/commonjs/tasks/document-question-answering/inference.d.ts +1 -3
  24. package/dist/commonjs/tasks/document-question-answering/inference.d.ts.map +1 -1
  25. package/dist/commonjs/tasks/feature-extraction/inference.d.ts +1 -1
  26. package/dist/commonjs/tasks/fill-mask/inference.d.ts +1 -3
  27. package/dist/commonjs/tasks/fill-mask/inference.d.ts.map +1 -1
  28. package/dist/commonjs/tasks/image-classification/inference.d.ts +4 -3
  29. package/dist/commonjs/tasks/image-classification/inference.d.ts.map +1 -1
  30. package/dist/commonjs/tasks/image-segmentation/inference.d.ts +1 -3
  31. package/dist/commonjs/tasks/image-segmentation/inference.d.ts.map +1 -1
  32. package/dist/commonjs/tasks/image-to-image/inference.d.ts +1 -3
  33. package/dist/commonjs/tasks/image-to-image/inference.d.ts.map +1 -1
  34. package/dist/commonjs/tasks/image-to-text/inference.d.ts +1 -5
  35. package/dist/commonjs/tasks/image-to-text/inference.d.ts.map +1 -1
  36. package/dist/commonjs/tasks/object-detection/inference.d.ts +1 -3
  37. package/dist/commonjs/tasks/object-detection/inference.d.ts.map +1 -1
  38. package/dist/commonjs/tasks/question-answering/inference.d.ts +1 -3
  39. package/dist/commonjs/tasks/question-answering/inference.d.ts.map +1 -1
  40. package/dist/commonjs/tasks/sentence-similarity/inference.d.ts +1 -1
  41. package/dist/commonjs/tasks/summarization/inference.d.ts +1 -3
  42. package/dist/commonjs/tasks/summarization/inference.d.ts.map +1 -1
  43. package/dist/commonjs/tasks/table-question-answering/inference.d.ts +1 -1
  44. package/dist/commonjs/tasks/text-classification/inference.d.ts +4 -3
  45. package/dist/commonjs/tasks/text-classification/inference.d.ts.map +1 -1
  46. package/dist/commonjs/tasks/text-to-audio/inference.d.ts +1 -5
  47. package/dist/commonjs/tasks/text-to-audio/inference.d.ts.map +1 -1
  48. package/dist/commonjs/tasks/text-to-image/inference.d.ts +1 -3
  49. package/dist/commonjs/tasks/text-to-image/inference.d.ts.map +1 -1
  50. package/dist/commonjs/tasks/text-to-speech/inference.d.ts +1 -5
  51. package/dist/commonjs/tasks/text-to-speech/inference.d.ts.map +1 -1
  52. package/dist/commonjs/tasks/text2text-generation/inference.d.ts +1 -3
  53. package/dist/commonjs/tasks/text2text-generation/inference.d.ts.map +1 -1
  54. package/dist/commonjs/tasks/token-classification/inference.d.ts +1 -3
  55. package/dist/commonjs/tasks/token-classification/inference.d.ts.map +1 -1
  56. package/dist/commonjs/tasks/translation/inference.d.ts +1 -3
  57. package/dist/commonjs/tasks/translation/inference.d.ts.map +1 -1
  58. package/dist/commonjs/tasks/video-classification/inference.d.ts +4 -3
  59. package/dist/commonjs/tasks/video-classification/inference.d.ts.map +1 -1
  60. package/dist/commonjs/tasks/visual-question-answering/inference.d.ts +1 -3
  61. package/dist/commonjs/tasks/visual-question-answering/inference.d.ts.map +1 -1
  62. package/dist/commonjs/tasks/zero-shot-classification/inference.d.ts +1 -3
  63. package/dist/commonjs/tasks/zero-shot-classification/inference.d.ts.map +1 -1
  64. package/dist/commonjs/tasks/zero-shot-image-classification/inference.d.ts +1 -3
  65. package/dist/commonjs/tasks/zero-shot-image-classification/inference.d.ts.map +1 -1
  66. package/dist/commonjs/tasks/zero-shot-object-detection/inference.d.ts +1 -3
  67. package/dist/commonjs/tasks/zero-shot-object-detection/inference.d.ts.map +1 -1
  68. package/dist/esm/hardware.d.ts +12 -0
  69. package/dist/esm/hardware.d.ts.map +1 -1
  70. package/dist/esm/hardware.js +15 -3
  71. package/dist/esm/local-apps.d.ts.map +1 -1
  72. package/dist/esm/local-apps.js +40 -21
  73. package/dist/esm/local-apps.spec.d.ts +2 -0
  74. package/dist/esm/local-apps.spec.d.ts.map +1 -0
  75. package/dist/esm/local-apps.spec.js +112 -0
  76. package/dist/esm/model-libraries-snippets.d.ts.map +1 -1
  77. package/dist/esm/model-libraries-snippets.js +23 -12
  78. package/dist/esm/model-libraries-snippets.spec.d.ts +2 -0
  79. package/dist/esm/model-libraries-snippets.spec.d.ts.map +1 -0
  80. package/dist/esm/model-libraries-snippets.spec.js +49 -0
  81. package/dist/esm/snippets/curl.js +4 -4
  82. package/dist/esm/snippets/js.js +5 -5
  83. package/dist/esm/tasks/audio-classification/inference.d.ts +4 -3
  84. package/dist/esm/tasks/audio-classification/inference.d.ts.map +1 -1
  85. package/dist/esm/tasks/automatic-speech-recognition/inference.d.ts +1 -5
  86. package/dist/esm/tasks/automatic-speech-recognition/inference.d.ts.map +1 -1
  87. package/dist/esm/tasks/chat-completion/inference.d.ts +18 -6
  88. package/dist/esm/tasks/chat-completion/inference.d.ts.map +1 -1
  89. package/dist/esm/tasks/depth-estimation/inference.d.ts +1 -1
  90. package/dist/esm/tasks/document-question-answering/inference.d.ts +1 -3
  91. package/dist/esm/tasks/document-question-answering/inference.d.ts.map +1 -1
  92. package/dist/esm/tasks/feature-extraction/inference.d.ts +1 -1
  93. package/dist/esm/tasks/fill-mask/inference.d.ts +1 -3
  94. package/dist/esm/tasks/fill-mask/inference.d.ts.map +1 -1
  95. package/dist/esm/tasks/image-classification/inference.d.ts +4 -3
  96. package/dist/esm/tasks/image-classification/inference.d.ts.map +1 -1
  97. package/dist/esm/tasks/image-segmentation/inference.d.ts +1 -3
  98. package/dist/esm/tasks/image-segmentation/inference.d.ts.map +1 -1
  99. package/dist/esm/tasks/image-to-image/inference.d.ts +1 -3
  100. package/dist/esm/tasks/image-to-image/inference.d.ts.map +1 -1
  101. package/dist/esm/tasks/image-to-text/inference.d.ts +1 -5
  102. package/dist/esm/tasks/image-to-text/inference.d.ts.map +1 -1
  103. package/dist/esm/tasks/object-detection/inference.d.ts +1 -3
  104. package/dist/esm/tasks/object-detection/inference.d.ts.map +1 -1
  105. package/dist/esm/tasks/question-answering/inference.d.ts +1 -3
  106. package/dist/esm/tasks/question-answering/inference.d.ts.map +1 -1
  107. package/dist/esm/tasks/sentence-similarity/inference.d.ts +1 -1
  108. package/dist/esm/tasks/summarization/inference.d.ts +1 -3
  109. package/dist/esm/tasks/summarization/inference.d.ts.map +1 -1
  110. package/dist/esm/tasks/table-question-answering/inference.d.ts +1 -1
  111. package/dist/esm/tasks/text-classification/inference.d.ts +4 -3
  112. package/dist/esm/tasks/text-classification/inference.d.ts.map +1 -1
  113. package/dist/esm/tasks/text-to-audio/inference.d.ts +1 -5
  114. package/dist/esm/tasks/text-to-audio/inference.d.ts.map +1 -1
  115. package/dist/esm/tasks/text-to-image/inference.d.ts +1 -3
  116. package/dist/esm/tasks/text-to-image/inference.d.ts.map +1 -1
  117. package/dist/esm/tasks/text-to-speech/inference.d.ts +1 -5
  118. package/dist/esm/tasks/text-to-speech/inference.d.ts.map +1 -1
  119. package/dist/esm/tasks/text2text-generation/inference.d.ts +1 -3
  120. package/dist/esm/tasks/text2text-generation/inference.d.ts.map +1 -1
  121. package/dist/esm/tasks/token-classification/inference.d.ts +1 -3
  122. package/dist/esm/tasks/token-classification/inference.d.ts.map +1 -1
  123. package/dist/esm/tasks/translation/inference.d.ts +1 -3
  124. package/dist/esm/tasks/translation/inference.d.ts.map +1 -1
  125. package/dist/esm/tasks/video-classification/inference.d.ts +4 -3
  126. package/dist/esm/tasks/video-classification/inference.d.ts.map +1 -1
  127. package/dist/esm/tasks/visual-question-answering/inference.d.ts +1 -3
  128. package/dist/esm/tasks/visual-question-answering/inference.d.ts.map +1 -1
  129. package/dist/esm/tasks/zero-shot-classification/inference.d.ts +1 -3
  130. package/dist/esm/tasks/zero-shot-classification/inference.d.ts.map +1 -1
  131. package/dist/esm/tasks/zero-shot-image-classification/inference.d.ts +1 -3
  132. package/dist/esm/tasks/zero-shot-image-classification/inference.d.ts.map +1 -1
  133. package/dist/esm/tasks/zero-shot-object-detection/inference.d.ts +1 -3
  134. package/dist/esm/tasks/zero-shot-object-detection/inference.d.ts.map +1 -1
  135. package/package.json +1 -1
  136. package/src/hardware.ts +15 -3
  137. package/src/local-apps.spec.ts +123 -0
  138. package/src/local-apps.ts +37 -18
  139. package/src/model-libraries-snippets.spec.ts +54 -0
  140. package/src/model-libraries-snippets.ts +24 -11
  141. package/src/snippets/curl.ts +4 -4
  142. package/src/snippets/js.ts +5 -5
  143. package/src/tasks/audio-classification/inference.ts +4 -3
  144. package/src/tasks/audio-classification/spec/input.json +3 -3
  145. package/src/tasks/automatic-speech-recognition/inference.ts +1 -5
  146. package/src/tasks/automatic-speech-recognition/spec/input.json +1 -2
  147. package/src/tasks/chat-completion/inference.ts +19 -6
  148. package/src/tasks/chat-completion/spec/input.json +14 -19
  149. package/src/tasks/common-definitions.json +0 -1
  150. package/src/tasks/depth-estimation/inference.ts +1 -1
  151. package/src/tasks/depth-estimation/spec/input.json +1 -2
  152. package/src/tasks/document-question-answering/inference.ts +1 -3
  153. package/src/tasks/document-question-answering/spec/input.json +1 -2
  154. package/src/tasks/feature-extraction/inference.ts +1 -1
  155. package/src/tasks/feature-extraction/spec/input.json +1 -1
  156. package/src/tasks/fill-mask/inference.ts +1 -3
  157. package/src/tasks/fill-mask/spec/input.json +1 -2
  158. package/src/tasks/image-classification/inference.ts +4 -3
  159. package/src/tasks/image-classification/spec/input.json +3 -3
  160. package/src/tasks/image-segmentation/inference.ts +1 -3
  161. package/src/tasks/image-segmentation/spec/input.json +1 -2
  162. package/src/tasks/image-to-image/inference.ts +1 -3
  163. package/src/tasks/image-to-image/spec/input.json +1 -2
  164. package/src/tasks/image-to-text/inference.ts +1 -5
  165. package/src/tasks/image-to-text/spec/input.json +1 -2
  166. package/src/tasks/object-detection/inference.ts +1 -3
  167. package/src/tasks/object-detection/spec/input.json +1 -2
  168. package/src/tasks/placeholder/spec/input.json +1 -2
  169. package/src/tasks/question-answering/inference.ts +1 -3
  170. package/src/tasks/question-answering/spec/input.json +1 -2
  171. package/src/tasks/sentence-similarity/inference.ts +1 -1
  172. package/src/tasks/sentence-similarity/spec/input.json +1 -2
  173. package/src/tasks/summarization/inference.ts +1 -3
  174. package/src/tasks/summarization/spec/input.json +1 -2
  175. package/src/tasks/table-question-answering/inference.ts +1 -1
  176. package/src/tasks/table-question-answering/spec/input.json +1 -2
  177. package/src/tasks/text-classification/inference.ts +4 -3
  178. package/src/tasks/text-classification/spec/input.json +3 -3
  179. package/src/tasks/text-to-audio/inference.ts +1 -5
  180. package/src/tasks/text-to-audio/spec/input.json +1 -2
  181. package/src/tasks/text-to-image/inference.ts +1 -3
  182. package/src/tasks/text-to-image/spec/input.json +1 -2
  183. package/src/tasks/text-to-speech/inference.ts +1 -5
  184. package/src/tasks/text-to-speech/spec/input.json +1 -2
  185. package/src/tasks/text2text-generation/inference.ts +1 -3
  186. package/src/tasks/text2text-generation/spec/input.json +1 -2
  187. package/src/tasks/token-classification/inference.ts +1 -3
  188. package/src/tasks/token-classification/spec/input.json +1 -2
  189. package/src/tasks/translation/inference.ts +1 -3
  190. package/src/tasks/translation/spec/input.json +1 -2
  191. package/src/tasks/video-classification/inference.ts +4 -3
  192. package/src/tasks/video-classification/spec/input.json +3 -3
  193. package/src/tasks/visual-question-answering/inference.ts +1 -3
  194. package/src/tasks/visual-question-answering/spec/input.json +1 -2
  195. package/src/tasks/zero-shot-classification/inference.ts +1 -3
  196. package/src/tasks/zero-shot-classification/spec/input.json +1 -2
  197. package/src/tasks/zero-shot-image-classification/inference.ts +1 -3
  198. package/src/tasks/zero-shot-image-classification/spec/input.json +1 -2
  199. package/src/tasks/zero-shot-object-detection/inference.ts +1 -3
  200. package/src/tasks/zero-shot-object-detection/spec/input.json +1 -2
  201. package/dist/commonjs/snippets/curl.spec.d.ts +0 -2
  202. package/dist/commonjs/snippets/curl.spec.d.ts.map +0 -1
  203. package/dist/commonjs/snippets/curl.spec.js +0 -89
  204. package/dist/commonjs/snippets/js.spec.d.ts +0 -2
  205. package/dist/commonjs/snippets/js.spec.d.ts.map +0 -1
  206. package/dist/commonjs/snippets/js.spec.js +0 -141
  207. package/dist/commonjs/snippets/python.spec.d.ts +0 -2
  208. package/dist/commonjs/snippets/python.spec.d.ts.map +0 -1
  209. package/dist/commonjs/snippets/python.spec.js +0 -135
  210. package/dist/esm/snippets/curl.spec.d.ts +0 -2
  211. package/dist/esm/snippets/curl.spec.d.ts.map +0 -1
  212. package/dist/esm/snippets/curl.spec.js +0 -87
  213. package/dist/esm/snippets/js.spec.d.ts +0 -2
  214. package/dist/esm/snippets/js.spec.d.ts.map +0 -1
  215. package/dist/esm/snippets/js.spec.js +0 -139
  216. package/dist/esm/snippets/python.spec.d.ts +0 -2
  217. package/dist/esm/snippets/python.spec.d.ts.map +0 -1
  218. package/dist/esm/snippets/python.spec.js +0 -133
  219. package/src/snippets/curl.spec.ts +0 -94
  220. package/src/snippets/js.spec.ts +0 -148
  221. 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": "object",
287
- "default": null,
288
- "nullable": true
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
- "title": "ChatCompletionInputToolType"
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",
@@ -26,7 +26,6 @@
26
26
  },
27
27
  "GenerationParameters": {
28
28
  "title": "GenerationParameters",
29
- "description": "Ad-hoc parametrization of the text generation process",
30
29
  "type": "object",
31
30
  "properties": {
32
31
  "temperature": {
@@ -13,7 +13,7 @@ export interface DepthEstimationInput {
13
13
  */
14
14
  inputs: unknown;
15
15
  /**
16
- * Additional inference parameters
16
+ * Additional inference parameters for Depth Estimation
17
17
  */
18
18
  parameters?: { [key: string]: unknown };
19
19
  [property: string]: unknown;
@@ -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 `Sentence Transformers` configuration `prompts` dictionary.
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 `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.",
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": "Additional inference parameters",
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": {
@@ -12,7 +12,7 @@ export interface TableQuestionAnsweringInput {
12
12
  */
13
13
  inputs: TableQuestionAnsweringInputData;
14
14
  /**
15
- * Additional inference parameters
15
+ * Additional inference parameters for Table Question Answering
16
16
  */
17
17
  parameters?: {
18
18
  [key: string]: unknown;
@@ -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": {