@huggingface/tasks 0.13.1-test → 0.13.1-test2

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 (198) hide show
  1. package/package.json +4 -2
  2. package/src/dataset-libraries.ts +89 -0
  3. package/src/default-widget-inputs.ts +718 -0
  4. package/src/gguf.ts +40 -0
  5. package/src/hardware.ts +482 -0
  6. package/src/index.ts +59 -0
  7. package/src/library-to-tasks.ts +76 -0
  8. package/src/local-apps.ts +412 -0
  9. package/src/model-data.ts +149 -0
  10. package/src/model-libraries-downloads.ts +18 -0
  11. package/src/model-libraries-snippets.ts +1128 -0
  12. package/src/model-libraries.ts +820 -0
  13. package/src/pipelines.ts +698 -0
  14. package/src/snippets/common.ts +39 -0
  15. package/src/snippets/curl.spec.ts +94 -0
  16. package/src/snippets/curl.ts +120 -0
  17. package/src/snippets/index.ts +7 -0
  18. package/src/snippets/inputs.ts +167 -0
  19. package/src/snippets/js.spec.ts +148 -0
  20. package/src/snippets/js.ts +305 -0
  21. package/src/snippets/python.spec.ts +144 -0
  22. package/src/snippets/python.ts +321 -0
  23. package/src/snippets/types.ts +16 -0
  24. package/src/tasks/audio-classification/about.md +86 -0
  25. package/src/tasks/audio-classification/data.ts +81 -0
  26. package/src/tasks/audio-classification/inference.ts +52 -0
  27. package/src/tasks/audio-classification/spec/input.json +35 -0
  28. package/src/tasks/audio-classification/spec/output.json +11 -0
  29. package/src/tasks/audio-to-audio/about.md +56 -0
  30. package/src/tasks/audio-to-audio/data.ts +70 -0
  31. package/src/tasks/automatic-speech-recognition/about.md +90 -0
  32. package/src/tasks/automatic-speech-recognition/data.ts +82 -0
  33. package/src/tasks/automatic-speech-recognition/inference.ts +160 -0
  34. package/src/tasks/automatic-speech-recognition/spec/input.json +35 -0
  35. package/src/tasks/automatic-speech-recognition/spec/output.json +38 -0
  36. package/src/tasks/chat-completion/inference.ts +322 -0
  37. package/src/tasks/chat-completion/spec/input.json +350 -0
  38. package/src/tasks/chat-completion/spec/output.json +206 -0
  39. package/src/tasks/chat-completion/spec/stream_output.json +213 -0
  40. package/src/tasks/common-definitions.json +100 -0
  41. package/src/tasks/depth-estimation/about.md +45 -0
  42. package/src/tasks/depth-estimation/data.ts +70 -0
  43. package/src/tasks/depth-estimation/inference.ts +35 -0
  44. package/src/tasks/depth-estimation/spec/input.json +25 -0
  45. package/src/tasks/depth-estimation/spec/output.json +16 -0
  46. package/src/tasks/document-question-answering/about.md +53 -0
  47. package/src/tasks/document-question-answering/data.ts +85 -0
  48. package/src/tasks/document-question-answering/inference.ts +110 -0
  49. package/src/tasks/document-question-answering/spec/input.json +85 -0
  50. package/src/tasks/document-question-answering/spec/output.json +36 -0
  51. package/src/tasks/feature-extraction/about.md +72 -0
  52. package/src/tasks/feature-extraction/data.ts +57 -0
  53. package/src/tasks/feature-extraction/inference.ts +40 -0
  54. package/src/tasks/feature-extraction/spec/input.json +47 -0
  55. package/src/tasks/feature-extraction/spec/output.json +15 -0
  56. package/src/tasks/fill-mask/about.md +51 -0
  57. package/src/tasks/fill-mask/data.ts +79 -0
  58. package/src/tasks/fill-mask/inference.ts +62 -0
  59. package/src/tasks/fill-mask/spec/input.json +38 -0
  60. package/src/tasks/fill-mask/spec/output.json +29 -0
  61. package/src/tasks/image-classification/about.md +50 -0
  62. package/src/tasks/image-classification/data.ts +88 -0
  63. package/src/tasks/image-classification/inference.ts +52 -0
  64. package/src/tasks/image-classification/spec/input.json +35 -0
  65. package/src/tasks/image-classification/spec/output.json +11 -0
  66. package/src/tasks/image-feature-extraction/about.md +23 -0
  67. package/src/tasks/image-feature-extraction/data.ts +59 -0
  68. package/src/tasks/image-segmentation/about.md +63 -0
  69. package/src/tasks/image-segmentation/data.ts +99 -0
  70. package/src/tasks/image-segmentation/inference.ts +69 -0
  71. package/src/tasks/image-segmentation/spec/input.json +45 -0
  72. package/src/tasks/image-segmentation/spec/output.json +26 -0
  73. package/src/tasks/image-text-to-text/about.md +76 -0
  74. package/src/tasks/image-text-to-text/data.ts +102 -0
  75. package/src/tasks/image-to-3d/about.md +62 -0
  76. package/src/tasks/image-to-3d/data.ts +75 -0
  77. package/src/tasks/image-to-image/about.md +129 -0
  78. package/src/tasks/image-to-image/data.ts +101 -0
  79. package/src/tasks/image-to-image/inference.ts +68 -0
  80. package/src/tasks/image-to-image/spec/input.json +55 -0
  81. package/src/tasks/image-to-image/spec/output.json +12 -0
  82. package/src/tasks/image-to-text/about.md +61 -0
  83. package/src/tasks/image-to-text/data.ts +82 -0
  84. package/src/tasks/image-to-text/inference.ts +143 -0
  85. package/src/tasks/image-to-text/spec/input.json +34 -0
  86. package/src/tasks/image-to-text/spec/output.json +14 -0
  87. package/src/tasks/index.ts +312 -0
  88. package/src/tasks/keypoint-detection/about.md +57 -0
  89. package/src/tasks/keypoint-detection/data.ts +50 -0
  90. package/src/tasks/mask-generation/about.md +65 -0
  91. package/src/tasks/mask-generation/data.ts +55 -0
  92. package/src/tasks/object-detection/about.md +37 -0
  93. package/src/tasks/object-detection/data.ts +86 -0
  94. package/src/tasks/object-detection/inference.ts +75 -0
  95. package/src/tasks/object-detection/spec/input.json +31 -0
  96. package/src/tasks/object-detection/spec/output.json +50 -0
  97. package/src/tasks/placeholder/about.md +15 -0
  98. package/src/tasks/placeholder/data.ts +21 -0
  99. package/src/tasks/placeholder/spec/input.json +35 -0
  100. package/src/tasks/placeholder/spec/output.json +17 -0
  101. package/src/tasks/question-answering/about.md +56 -0
  102. package/src/tasks/question-answering/data.ts +75 -0
  103. package/src/tasks/question-answering/inference.ts +99 -0
  104. package/src/tasks/question-answering/spec/input.json +67 -0
  105. package/src/tasks/question-answering/spec/output.json +29 -0
  106. package/src/tasks/reinforcement-learning/about.md +167 -0
  107. package/src/tasks/reinforcement-learning/data.ts +75 -0
  108. package/src/tasks/sentence-similarity/about.md +97 -0
  109. package/src/tasks/sentence-similarity/data.ts +101 -0
  110. package/src/tasks/sentence-similarity/inference.ts +32 -0
  111. package/src/tasks/sentence-similarity/spec/input.json +40 -0
  112. package/src/tasks/sentence-similarity/spec/output.json +12 -0
  113. package/src/tasks/summarization/about.md +58 -0
  114. package/src/tasks/summarization/data.ts +76 -0
  115. package/src/tasks/summarization/inference.ts +57 -0
  116. package/src/tasks/summarization/spec/input.json +42 -0
  117. package/src/tasks/summarization/spec/output.json +14 -0
  118. package/src/tasks/table-question-answering/about.md +43 -0
  119. package/src/tasks/table-question-answering/data.ts +59 -0
  120. package/src/tasks/table-question-answering/inference.ts +61 -0
  121. package/src/tasks/table-question-answering/spec/input.json +44 -0
  122. package/src/tasks/table-question-answering/spec/output.json +40 -0
  123. package/src/tasks/tabular-classification/about.md +65 -0
  124. package/src/tasks/tabular-classification/data.ts +68 -0
  125. package/src/tasks/tabular-regression/about.md +87 -0
  126. package/src/tasks/tabular-regression/data.ts +57 -0
  127. package/src/tasks/text-classification/about.md +173 -0
  128. package/src/tasks/text-classification/data.ts +103 -0
  129. package/src/tasks/text-classification/inference.ts +51 -0
  130. package/src/tasks/text-classification/spec/input.json +35 -0
  131. package/src/tasks/text-classification/spec/output.json +11 -0
  132. package/src/tasks/text-generation/about.md +154 -0
  133. package/src/tasks/text-generation/data.ts +114 -0
  134. package/src/tasks/text-generation/inference.ts +200 -0
  135. package/src/tasks/text-generation/spec/input.json +219 -0
  136. package/src/tasks/text-generation/spec/output.json +179 -0
  137. package/src/tasks/text-generation/spec/stream_output.json +103 -0
  138. package/src/tasks/text-to-3d/about.md +62 -0
  139. package/src/tasks/text-to-3d/data.ts +56 -0
  140. package/src/tasks/text-to-audio/inference.ts +143 -0
  141. package/src/tasks/text-to-audio/spec/input.json +31 -0
  142. package/src/tasks/text-to-audio/spec/output.json +17 -0
  143. package/src/tasks/text-to-image/about.md +96 -0
  144. package/src/tasks/text-to-image/data.ts +100 -0
  145. package/src/tasks/text-to-image/inference.ts +75 -0
  146. package/src/tasks/text-to-image/spec/input.json +63 -0
  147. package/src/tasks/text-to-image/spec/output.json +13 -0
  148. package/src/tasks/text-to-speech/about.md +63 -0
  149. package/src/tasks/text-to-speech/data.ts +79 -0
  150. package/src/tasks/text-to-speech/inference.ts +145 -0
  151. package/src/tasks/text-to-speech/spec/input.json +31 -0
  152. package/src/tasks/text-to-speech/spec/output.json +7 -0
  153. package/src/tasks/text-to-video/about.md +41 -0
  154. package/src/tasks/text-to-video/data.ts +102 -0
  155. package/src/tasks/text2text-generation/inference.ts +55 -0
  156. package/src/tasks/text2text-generation/spec/input.json +55 -0
  157. package/src/tasks/text2text-generation/spec/output.json +14 -0
  158. package/src/tasks/token-classification/about.md +76 -0
  159. package/src/tasks/token-classification/data.ts +92 -0
  160. package/src/tasks/token-classification/inference.ts +85 -0
  161. package/src/tasks/token-classification/spec/input.json +65 -0
  162. package/src/tasks/token-classification/spec/output.json +37 -0
  163. package/src/tasks/translation/about.md +65 -0
  164. package/src/tasks/translation/data.ts +70 -0
  165. package/src/tasks/translation/inference.ts +67 -0
  166. package/src/tasks/translation/spec/input.json +50 -0
  167. package/src/tasks/translation/spec/output.json +14 -0
  168. package/src/tasks/unconditional-image-generation/about.md +50 -0
  169. package/src/tasks/unconditional-image-generation/data.ts +72 -0
  170. package/src/tasks/video-classification/about.md +37 -0
  171. package/src/tasks/video-classification/data.ts +84 -0
  172. package/src/tasks/video-classification/inference.ts +59 -0
  173. package/src/tasks/video-classification/spec/input.json +42 -0
  174. package/src/tasks/video-classification/spec/output.json +10 -0
  175. package/src/tasks/video-text-to-text/about.md +98 -0
  176. package/src/tasks/video-text-to-text/data.ts +66 -0
  177. package/src/tasks/visual-question-answering/about.md +48 -0
  178. package/src/tasks/visual-question-answering/data.ts +97 -0
  179. package/src/tasks/visual-question-answering/inference.ts +62 -0
  180. package/src/tasks/visual-question-answering/spec/input.json +41 -0
  181. package/src/tasks/visual-question-answering/spec/output.json +21 -0
  182. package/src/tasks/zero-shot-classification/about.md +40 -0
  183. package/src/tasks/zero-shot-classification/data.ts +70 -0
  184. package/src/tasks/zero-shot-classification/inference.ts +67 -0
  185. package/src/tasks/zero-shot-classification/spec/input.json +50 -0
  186. package/src/tasks/zero-shot-classification/spec/output.json +11 -0
  187. package/src/tasks/zero-shot-image-classification/about.md +75 -0
  188. package/src/tasks/zero-shot-image-classification/data.ts +84 -0
  189. package/src/tasks/zero-shot-image-classification/inference.ts +61 -0
  190. package/src/tasks/zero-shot-image-classification/spec/input.json +45 -0
  191. package/src/tasks/zero-shot-image-classification/spec/output.json +10 -0
  192. package/src/tasks/zero-shot-object-detection/about.md +45 -0
  193. package/src/tasks/zero-shot-object-detection/data.ts +67 -0
  194. package/src/tasks/zero-shot-object-detection/inference.ts +66 -0
  195. package/src/tasks/zero-shot-object-detection/spec/input.json +40 -0
  196. package/src/tasks/zero-shot-object-detection/spec/output.json +47 -0
  197. package/src/tokenizer-data.ts +32 -0
  198. package/src/widget-example.ts +125 -0
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Inference code generated from the JSON schema spec in ./spec
3
+ *
4
+ * Using src/scripts/inference-codegen
5
+ */
6
+ /**
7
+ * Inputs for Zero Shot Object Detection inference
8
+ */
9
+ export interface ZeroShotObjectDetectionInput {
10
+ /**
11
+ * The input image data, with candidate labels
12
+ */
13
+ inputs: ZeroShotObjectDetectionInputData;
14
+ /**
15
+ * Additional inference parameters
16
+ */
17
+ parameters?: {
18
+ [key: string]: unknown;
19
+ };
20
+ [property: string]: unknown;
21
+ }
22
+ /**
23
+ * The input image data, with candidate labels
24
+ */
25
+ export interface ZeroShotObjectDetectionInputData {
26
+ /**
27
+ * The candidate labels for this image
28
+ */
29
+ candidateLabels: string[];
30
+ /**
31
+ * The image data to generate bounding boxes from
32
+ */
33
+ image: unknown;
34
+ [property: string]: unknown;
35
+ }
36
+ /**
37
+ * The predicted bounding box. Coordinates are relative to the top left corner of the input
38
+ * image.
39
+ */
40
+ export interface BoundingBox {
41
+ xmax: number;
42
+ xmin: number;
43
+ ymax: number;
44
+ ymin: number;
45
+ [property: string]: unknown;
46
+ }
47
+ export type ZeroShotObjectDetectionOutput = ZeroShotObjectDetectionOutputElement[];
48
+ /**
49
+ * Outputs of inference for the Zero Shot Object Detection task
50
+ */
51
+ export interface ZeroShotObjectDetectionOutputElement {
52
+ /**
53
+ * The predicted bounding box. Coordinates are relative to the top left corner of the input
54
+ * image.
55
+ */
56
+ box: BoundingBox;
57
+ /**
58
+ * A candidate label
59
+ */
60
+ label: string;
61
+ /**
62
+ * The associated score / probability
63
+ */
64
+ score: number;
65
+ [property: string]: unknown;
66
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "$id": "/inference/schemas/zero-shot-object-detection/input.json",
3
+ "$schema": "http://json-schema.org/draft-06/schema#",
4
+ "description": "Inputs for Zero Shot Object Detection inference",
5
+ "title": "ZeroShotObjectDetectionInput",
6
+ "type": "object",
7
+ "properties": {
8
+ "inputs": {
9
+ "description": "The input image data, with candidate labels",
10
+ "type": "object",
11
+ "title": "ZeroShotObjectDetectionInputData",
12
+ "properties": {
13
+ "image": {
14
+ "description": "The image data to generate bounding boxes from"
15
+ },
16
+ "candidateLabels": {
17
+ "description": "The candidate labels for this image",
18
+ "type": "array",
19
+ "items": {
20
+ "type": "string"
21
+ }
22
+ }
23
+ },
24
+ "required": ["image", "candidateLabels"]
25
+ },
26
+ "parameters": {
27
+ "description": "Additional inference parameters",
28
+ "$ref": "#/$defs/ZeroShotObjectDetectionParameters"
29
+ }
30
+ },
31
+ "$defs": {
32
+ "ZeroShotObjectDetectionParameters": {
33
+ "title": "ZeroShotObjectDetectionParameters",
34
+ "description": "Additional inference parameters for Zero Shot Object Detection",
35
+ "type": "object",
36
+ "properties": {}
37
+ }
38
+ },
39
+ "required": ["inputs"]
40
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$id": "/inference/schemas/zero-shot-object-detection/output.json",
3
+ "$schema": "http://json-schema.org/draft-06/schema#",
4
+ "description": "Outputs of inference for the Zero Shot Object Detection task",
5
+ "title": "ZeroShotObjectDetectionOutput",
6
+ "type": "array",
7
+ "items": {
8
+ "type": "object",
9
+ "title": "ZeroShotObjectDetectionOutputElement",
10
+ "properties": {
11
+ "label": {
12
+ "type": "string",
13
+ "description": "A candidate label"
14
+ },
15
+ "score": {
16
+ "type": "number",
17
+ "description": "The associated score / probability"
18
+ },
19
+ "box": {
20
+ "$ref": "#/$defs/BoundingBox",
21
+ "description": "The predicted bounding box. Coordinates are relative to the top left corner of the input image."
22
+ }
23
+ },
24
+ "required": ["box", "label", "score"]
25
+ },
26
+ "$defs": {
27
+ "BoundingBox": {
28
+ "title": "BoundingBox",
29
+ "type": "object",
30
+ "properties": {
31
+ "xmin": {
32
+ "type": "integer"
33
+ },
34
+ "xmax": {
35
+ "type": "integer"
36
+ },
37
+ "ymin": {
38
+ "type": "integer"
39
+ },
40
+ "ymax": {
41
+ "type": "integer"
42
+ }
43
+ },
44
+ "required": ["xmin", "xmax", "ymin", "ymax"]
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,32 @@
1
+ export const SPECIAL_TOKENS_ATTRIBUTES = [
2
+ "bos_token",
3
+ "eos_token",
4
+ "unk_token",
5
+ "sep_token",
6
+ "pad_token",
7
+ "cls_token",
8
+ "mask_token",
9
+ // additional_special_tokens (TODO)
10
+ ] as const;
11
+
12
+ /**
13
+ * Public interface for a tokenizer's special tokens mapping
14
+ */
15
+ export interface AddedToken {
16
+ __type: "AddedToken";
17
+ content?: string;
18
+ lstrip?: boolean;
19
+ normalized?: boolean;
20
+ rstrip?: boolean;
21
+ single_word?: boolean;
22
+ }
23
+ export type SpecialTokensMap = {
24
+ [key in (typeof SPECIAL_TOKENS_ATTRIBUTES)[number]]?: string | AddedToken | null;
25
+ };
26
+ /**
27
+ * Public interface for tokenizer config
28
+ */
29
+ export interface TokenizerConfig extends SpecialTokensMap {
30
+ use_default_system_prompt?: boolean;
31
+ chat_template?: string | Array<{ name: string; template: string }>;
32
+ }
@@ -0,0 +1,125 @@
1
+ /**
2
+ * See default-widget-inputs.ts for the default widget inputs, this files only contains the types
3
+ */
4
+
5
+ import type { ChatCompletionInputMessage } from "./tasks/index.js";
6
+
7
+ type TableData = Record<string, (string | number)[]>;
8
+
9
+ //#region outputs
10
+ export type WidgetExampleOutputLabels = Array<{ label: string; score: number }>;
11
+ export interface WidgetExampleOutputAnswerScore {
12
+ answer: string;
13
+ score: number;
14
+ }
15
+ export interface WidgetExampleOutputText {
16
+ text: string;
17
+ }
18
+ export interface WidgetExampleOutputUrl {
19
+ url: string;
20
+ }
21
+
22
+ export type WidgetExampleOutput =
23
+ | WidgetExampleOutputLabels
24
+ | WidgetExampleOutputAnswerScore
25
+ | WidgetExampleOutputText
26
+ | WidgetExampleOutputUrl;
27
+ //#endregion
28
+
29
+ export interface WidgetExampleBase<TOutput> {
30
+ example_title?: string;
31
+ group?: string;
32
+ /**
33
+ * Potential overrides to API parameters for this specific example
34
+ * (takes precedences over the model card metadata's inference.parameters)
35
+ */
36
+ parameters?: {
37
+ /// token-classification
38
+ aggregation_strategy?: string;
39
+ /// text-generation
40
+ top_k?: number;
41
+ top_p?: number;
42
+ temperature?: number;
43
+ max_new_tokens?: number;
44
+ do_sample?: boolean;
45
+ /// text-to-image
46
+ negative_prompt?: string;
47
+ guidance_scale?: number;
48
+ num_inference_steps?: number;
49
+ };
50
+ /**
51
+ * Optional output
52
+ */
53
+ output?: TOutput;
54
+ }
55
+
56
+ export interface WidgetExampleChatInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
57
+ messages: ChatCompletionInputMessage[];
58
+ }
59
+
60
+ export interface WidgetExampleTextInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
61
+ text: string;
62
+ }
63
+
64
+ export interface WidgetExampleTextAndContextInput<TOutput = WidgetExampleOutput>
65
+ extends WidgetExampleTextInput<TOutput> {
66
+ context: string;
67
+ }
68
+
69
+ export interface WidgetExampleTextAndTableInput<TOutput = WidgetExampleOutput> extends WidgetExampleTextInput<TOutput> {
70
+ table: TableData;
71
+ }
72
+
73
+ export interface WidgetExampleAssetInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
74
+ src: string;
75
+ }
76
+ export interface WidgetExampleAssetAndPromptInput<TOutput = WidgetExampleOutput>
77
+ extends WidgetExampleAssetInput<TOutput> {
78
+ prompt: string;
79
+ }
80
+
81
+ export type WidgetExampleAssetAndTextInput<TOutput = WidgetExampleOutput> = WidgetExampleAssetInput<TOutput> &
82
+ WidgetExampleTextInput<TOutput>;
83
+
84
+ export type WidgetExampleAssetAndZeroShotInput<TOutput = WidgetExampleOutput> = WidgetExampleAssetInput<TOutput> &
85
+ WidgetExampleZeroShotTextInput<TOutput>;
86
+
87
+ export interface WidgetExampleStructuredDataInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
88
+ structured_data: TableData;
89
+ }
90
+
91
+ export interface WidgetExampleTableDataInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
92
+ table: TableData;
93
+ }
94
+
95
+ export interface WidgetExampleZeroShotTextInput<TOutput = WidgetExampleOutput> extends WidgetExampleTextInput<TOutput> {
96
+ text: string;
97
+ candidate_labels: string;
98
+ multi_class: boolean;
99
+ }
100
+
101
+ export interface WidgetExampleSentenceSimilarityInput<TOutput = WidgetExampleOutput>
102
+ extends WidgetExampleBase<TOutput> {
103
+ source_sentence: string;
104
+ sentences: string[];
105
+ }
106
+
107
+ //#endregion
108
+
109
+ export type WidgetExample<TOutput = WidgetExampleOutput> =
110
+ | WidgetExampleChatInput<TOutput>
111
+ | WidgetExampleTextInput<TOutput>
112
+ | WidgetExampleTextAndContextInput<TOutput>
113
+ | WidgetExampleTextAndTableInput<TOutput>
114
+ | WidgetExampleAssetInput<TOutput>
115
+ | WidgetExampleAssetAndPromptInput<TOutput>
116
+ | WidgetExampleAssetAndTextInput<TOutput>
117
+ | WidgetExampleAssetAndZeroShotInput<TOutput>
118
+ | WidgetExampleStructuredDataInput<TOutput>
119
+ | WidgetExampleTableDataInput<TOutput>
120
+ | WidgetExampleZeroShotTextInput<TOutput>
121
+ | WidgetExampleSentenceSimilarityInput<TOutput>;
122
+
123
+ type KeysOfUnion<T> = T extends unknown ? keyof T : never;
124
+
125
+ export type WidgetExampleAttribute = KeysOfUnion<WidgetExample>;